segunda-feira, 22 de julho de 2013

How to call webbrowser from VB6 using API

To perform this task the code is extremely simple.

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()
   Dim r As Long
   r = ShellExecute(0, "open", "http://www.microsoft.com", 0, 0, 1)
End Sub
 
 Really simple, isn't it?

Nenhum comentário:

Postar um comentário