
How to launch webbrowser from VB6?
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
Const SW_SHOWNORMAL = 1
Private Sub Form_Load()
ShellExecute Me.hwnd, vbNullString, "xxx.com, vbNullString, "C:\",
SW_SHOWNORMAL
End Sub
best regards
Alex
--
Dim Life as Boolean
Life = True
http://www.crazyALEX.notrix.de
ich wnsche noch nen bug-freien Tag!
i'll wish you a bug-free day!
Quote:
>How do I launch my webbrowser from VB6? In VB3 the following function
worked
>just fine, but not under VB6.
>Declare Function ShellExecute Lib "shell.dll" (ByVal hWnd As Integer, ByVal
>Options As Long, ByVal FileName As String, ByVal Params As Long, ByVal
>DefaultDir As String, ByVal ShowCmd As Integer) As Integer
>Sub ConnectToWebPage(WebPage As String)
> Dim rtn As Integer, MyDir As String
> MyDir = CurDir$
> rtn = ShellExecute(Screen.ActiveForm.hWnd, 0, WebPage, 0, MyDir,
>SW_SHOWMAXIMIZED)
> If Not rtn > 32 Then
> Msg = "Connection failed."
> MsgBox (Msg), 16, "nO Connection"
> End If
>End Sub
>--
>Eric J. van Dorp
>Van Dorp Educatieve Programmatuur
>Postbox 268
>2990 AG Barendrecht
>The Netherlands