Results 1 to 3 of 3

Thread: [RESOLVED] error 339 question please

  1. #1

    Thread Starter
    Hyperactive Member jokerfool's Avatar
    Join Date
    Dec 2006
    Location
    Gold Coast, Australia
    Posts
    452

    Resolved [RESOLVED] error 339 question please

    I know what the error 339 means, but in my software I place this link on a button:

    Code:
    ShellExecute Me.hWnd, "Open", "http://www.google.com", 0&, 0&, SW_NORMAL
    In the option explicit I have the following, is there something else that needs to be added, because I get the error 339 when I add the above to a button, then when I hit quit I get the error, without the code when i hit quit, it just closes and no error:

    Code:
    Option Explicit
    Option Compare Text
    
    Private Declare Function InitCommonControls Lib "comctl32.dll" () As Long
    
    Private WinsockHTML As String
    
    'Constants for use in 'shellexecute'
    Const SW_NORMAL = 1
    Const SW_SHOW = 5
        
    'The shell execute API declarations
    Private Declare Function ShellExecute Lib "shell32.dll" _
        Alias "ShellExecuteA" (ByVal hWnd As Long, _
        ByVal lpOperation As String, ByVal lpFile As String, _
        ByVal lpParameters As String, ByVal lpDirectory As String, _
        ByVal nShowCmd As Long) As Long
        
    'window thingy
        Private Const HWND_TOPMOST = -1
        Private Const HWND_NOTOPMOST = -2
    
        Private Const SWP_NOSIZE = &H1
        Private Const SWP_NOMOVE = &H2
        Private Const SWP_NOACTIVATE = &H10
        Private Const SWP_SHOWWINDOW = &H40
        
        'declare API
        Private Declare Sub SetWindowPos Lib "user32" (ByVal hWnd As Long, _
          ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, _
          ByVal cX As Long, ByVal cY As Long, ByVal wFlags As Long)
    What am I missing?

    Thank you.

  2. #2

    Thread Starter
    Hyperactive Member jokerfool's Avatar
    Join Date
    Dec 2006
    Location
    Gold Coast, Australia
    Posts
    452

    Re: error 339 question please

    Does this line need to mention some other ocx file or something, I am unsure:

    Code:
    Private Declare Function InitCommonControls Lib "comctl32.dll" () As Long

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: error 339 question please

    Having no clue what error 339 was, I Goggled it. It appears to indicate that a specific component is not registered properly.

    What component is it telling you about? What is the exact wording of the error message?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width