Click to See Complete Forum and Search --> : Start / Run...
snakedjip
February 3rd, 2000, 08:12 AM
Hello,
Using Win95/Win98, if you were to click on Start / Run..., and then type "http://www.microsoft.com" for example, Windows would launch your default browser and open up Microsoft's page.
Other than generating Mouse Moves and Mouse clicks, how would one programatically re-create the same behaviour using VB ? In other words, what's the easiest way to start up your browser with a given web address using VB ?
snakedjip
February 3rd, 2000, 08:12 AM
Hello,
Using Win95/Win98, if you were to click on Start / Run..., and then type "http://www.microsoft.com" for example, Windows would launch your default browser and open up Microsoft's page.
Other than generating Mouse Moves and Mouse clicks, how would one programatically re-create the same behaviour using VB ? In other words, what's the easiest way to start up your browser with a given web address using VB ?
snakedjip
February 3rd, 2000, 08:12 AM
Hello,
Using Win95/Win98, if you were to click on Start / Run..., and then type "http://www.microsoft.com" for example, Windows would launch your default browser and open up Microsoft's page.
Other than generating Mouse Moves and Mouse clicks, how would one programatically re-create the same behaviour using VB ? In other words, what's the easiest way to start up your browser with a given web address using VB ?
Aaron Young
February 3rd, 2000, 08:16 AM
Use the ShellExecute API, ie.
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 0&, "OPEN", "http://www.godeguru.com", "", "", 1
End Sub
Aaron Young
Analyst Programmer
ajyoung@pressenter.com
aarony@redwingsoftware.com
Starcraft
February 3rd, 2000, 10:27 AM
'ok this will work for sure....
'put this in the forms 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
'This is the code so when they click the label it will launch the browser and 'the address you specified
private Sub Label1_Click()
Call ShellExecute(0&, "OPEN", "http://www.doodie.com", "", "", 1)
End Sub
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.