Results 1 to 6 of 6

Thread: code for a commond button

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Location
    vbforums
    Posts
    809

    code for a commond button

    please help for a code to get URL (website) through commond button

  2. #2
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: code for a commond button

    Hey janu,

    Not a clear question

    when a command button is pressed, then what you wan to do really?

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

    Re: code for a commond button

    What do you mean by "get URL"? Are you asking how to display a web page from a VB6 application using a command button?

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Mar 2009
    Location
    vbforums
    Posts
    809

    Re: code for a commond button

    Quote Originally Posted by Hack View Post
    What do you mean by "get URL"? Are you asking how to display a web page from a VB6 application using a command button?

    yes sir, you got my qurstion

  5. #5
    PowerPoster Fazi's Avatar
    Join Date
    Aug 2005
    Location
    Underworld
    Posts
    2,525

    Re: code for a commond button


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

    Re: code for a commond button

    Try this
    Code:
    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
    
    Private Sub Command1_Click() 
       Dim lngOpenPage As Long
         lngOpenPage = ShellExecute(Form1.hwnd, "Open", "http://www.vbforums.com",  0&, 0&, 0&)
    End Sub

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