use microsoft internet controls (reference, components)
instruction
WebBrowser.Navi gate (sHtmlFile)
"Roy G. Vervoort" <roy.vervoort@r ojaal.nl> schreef in bericht
news:4023803d$0 $326$e4fe514c@n ews.xs4all.nl.. .[color=blue]
>
> I want a (local) webpage to open on the click of a button in VB, does[/color]
anyone[color=blue]
> know how to do this
>
> roy
>
> netherlands
>
>[/color]
Best bet would be the "ShellExecu te" API call, which will open the local
page in whatever the current browser is defined as.
Toss the following code into a module called "ShellExec" , and call it
as ShellExec.RunFi le "local_webpage. htm" ...
Private Declare Function GetDesktopWindo w Lib "user32" () As Long
Public Declare Function ShellExecute Lib "shell32.dl l" Alias "ShellExecu teA"
(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
Public Const SW_SHOWNORMAL = 3
'-----------------------------------------------'
' '
' Use: '
' ShellExec.RunFi le(filename As String) As Long '
' '
' Executes 'filename' via it's associated '
' program file. Great for external help. '
' '
'-----------------------------------------------'
Public Function RunFile(ByVal strDocName As String) As Long
Dim Scr_hDC As Long
Dim lngRes As Long
Scr_hDC = GetDesktopWindo w()
RunAssociateFil e = ShellExecute(Sc r_hDC, "Open", strDocName, "", "C:\",
SW_SHOWNORMAL)
End Function
"Roy G. Vervoort" <roy.vervoort@r ojaal.nl> wrote in message
news:4023803d$0 $326$e4fe514c@n ews.xs4all.nl.. .[color=blue]
>
> I want a (local) webpage to open on the click of a button in VB, does[/color]
anyone[color=blue]
> know how to do this
>
> roy
>
> netherlands
>
>[/color]
Comment