How can i open the content of webbrowser in new a window with a command button? (like iexplorer or default web browser ).
Printable View
How can i open the content of webbrowser in new a window with a command button? (like iexplorer or default web browser ).
You could use this:VB Code:
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() Call ShellExecute(hwnd, "Open", "http://www.google.com", "", App.Path, 1) End Sub
what you write for me is for google webpage, but i will not know what page will be in webbrowser1
Ok, then you can use this:Please add to my reputation if I helped!VB Code:
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() Call ShellExecute(hwnd, "Open", WebBrowser1.LocationURL, "", App.Path, 1) End Sub
thenx .. it`s what i need ..
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 Const SW_NORMAL = 1
Private Sub Command1_Click()
ShellExecute Me.hwnd, "Open", "http://www.ifwcreations.com", 0&, 0&, SW_NORMAL
End Sub
If u got ur answer then resolved it.[U]