Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking to a web page from VB6

Status
Not open for further replies.

dkn

Programmer
Oct 11, 2000
60
US
I want to link my VB app to some web based help files, but am having a little trouble. I have inserted the Internet Transfer Control and added the code inet1.openurl...to a menu click event but nothing happens. What am I missing?
 
Could you give an example of the code? There could be several things wrong.

John Stephens
 
If you just want to open the files in a browser the easiest and quickest is with this code here. This also includes sending an email to your default if you like and no internet controls in site!

Public 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

then call this with one of the two following commands.

Dim lng as Long

'email the internet site
lng = ShellExecute (frmMain.hwnd, "Open", "mailto:xxx@yyy.net", "", App.Path, 1)

'open the internet site
lng = ShellExecute(frmMain.hwnd, "Open", " "", App.Path, 1)

chat soon
Michael
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top