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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make a Command Button launch a local html file 3

Status
Not open for further replies.

mpdoc

Programmer
Sep 21, 1999
5
0
0
IT
Visit site
I'm a beginner triyng to create a VB5 form (saved as autorun.exe) for start browsing a local web on a cd rom.<br>
My question is: how can I use a command button to start navigation opening the cd home page with the system<br>
default web browser (win98 system) ???<br>
Please help me!<br>
Thanx Marco.
 
Hi mpdoc!<br>
<br>
You have to make a call to the Windows Shell. Put the following into your code:<br>
<br>
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<br>
<br>
and this constant:<br>
Public Const SW_SHOWNORMAL = 1<br>
<br>
Call it like:<br>
Call ShellExecute(me.hwnd, "open", " vbNull, vbNull, SW_SHOWNORMAL)<br>
<br>
It will open the tek-tips website using the default browser.<br>
<br>
Chip H.<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top