|
-
September 15th, 2001, 11:03 PM
#1
web link
how do i add a html link to a menu control...for contact info in the help section on a menu...i have seen other apps use this function but i cant seem to find out how to do this....
thanx in advance
midnightservice
-
September 16th, 2001, 04:18 PM
#2
Re: web link
You can use The ShellExecute API for this
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()
ShellExecute me.hwnd, "open", "http://www.codeguru.com", "", "", 0
End Sub
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
-
September 16th, 2001, 06:31 PM
#3
Re: web link
Or you could simply use the Shell function in VB:
Shell "C:\Program Files\Internet Explorer\iexplore.exe http://www.microsoft.com", vbNormalFocus
-
September 17th, 2001, 01:00 AM
#4
Re: web link
Only if that's the path to internet explorer. Using ShellExecute, you will always use the default browser (could be Netscape or Opera as well), and don't have to worry about the path.
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
-
September 17th, 2001, 09:34 AM
#5
Re: web link
Great, I was just looking for that.
Regards,
Jim Jackson
-
September 23rd, 2004, 07:37 PM
#6
Re: web link
[QUOTE=Cakkie]You can use The ShellExecute API for this
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()
ShellExecute me.hwnd, "open", "http://www.codeguru.com", "", "", 0
End Sub
Cakkie-
Using this code, How do I make a clickable link on a form ?
I would like the Link to work just like on an HTML page- that is, when the use clicks the link on the form, it launches a web browser to the URL.
Last edited by cappy2112; September 23rd, 2004 at 07:37 PM.
Reason: typoes
-
September 24th, 2004, 12:12 AM
#7
Re: web link
 Originally Posted by tobeyu
Or you could simply use the Shell function in VB:
Shell "C:\Program Files\Internet Explorer\iexplore.exe http://www.microsoft.com", vbNormalFocus
Well, officially this will not work because if the end user is using Drive D: as his/her primary drive then it will face problems.
Shell ("start http://www.helloindia.tk") would rather work 
also u can follow wot cappy suggested.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|