Results 1 to 3 of 3

Thread: [Resolved] Hyperlinks in Menu Buttons

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2005
    Posts
    11

    Resolved [Resolved] Hyperlinks in Menu Buttons

    Can somone help me, i hav tried searching google and MSDN and i cant find anything which tells you how to put a hyperlink in a command button. I have some websites which i want to put in a menu but i need to no the code if there is any which will load them when clicked.

    Any help would be much appreaciated

    Cheers
    Last edited by TonE; Feb 7th, 2005 at 06:21 PM.

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Hyperlinks in Menu Buttons

    VB Code:
    1. Option Explicit
    2.  
    3. Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
    4. ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    5.  
    6. Private Const SW_HIDE As Long = 0
    7. Private Const SW_SHOWNORMAL As Long = 1
    8.  
    9. Private Sub Command1_Click()
    10.     ShellExecute 0&, "OPEN", "http://www.msn.com", vbNullString, "C:\", SW_SHOWNORMAL
    11.  
    12.  ' ShellExecute Me.hwnd, "open", "c:\CSP_SNMP.vbs", "router1 Public", "C:\", 1
    13.  ' c:\ = Destination Folder
    14. End Sub

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2005
    Posts
    11

    Re: Hyperlinks in Menu Buttons

    Ok That worked, Thanks

    Is there a way of makeing the websites load in a new window so that it dosnt overwrite the old one. Say you had 4 websites in 1 menu list and you wanted to load them all.

    Cheers

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