Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21281

Open a website within a desktop application

$
0
0
Hi all,

Can I open a website page in a desktop application window, not in the browser?

Using the following launches the browser:
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()
OpenURL "http://www.vbforums.com"
End Sub

Private Sub OpenURL(URL As String)
    Const SW_SHOWNORMAL = 1
    ShellExecute Me.hwnd, "open", URL, 0&, 0&, SW_SHOWNORMAL
End Sub

Thanks in advance,

Viewing all articles
Browse latest Browse all 21281

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>