URL mit Standardbrowser öffnen?
Hallo..
Ich hab schonwieder ein Problem, oder ich bin einfach nicht intelligent genug für VB
Also...
Ich möchte gerne per Klick auf einem Menüpunkt, oder Button, etc. einen Link im Standardbrowser öffnen lassen.
Habe auch schon gegooglet und ein paar Code-Schnipsel entdecken können, jedoch gibt dann beim Kompilieren Fehler.
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 Result&
Result = ShellExecute(Me.hwnd, "Open", _
"http://www.foobar.de", "", App.Path, 1)
End Sub
Bei ShellExecute sagt mir der Compiler das hwnd nicht bekannt ist.
Jemand eine/n Lösung/Rat?
Ich hab schonwieder ein Problem, oder ich bin einfach nicht intelligent genug für VB
Also...
Ich möchte gerne per Klick auf einem Menüpunkt, oder Button, etc. einen Link im Standardbrowser öffnen lassen.
Habe auch schon gegooglet und ein paar Code-Schnipsel entdecken können, jedoch gibt dann beim Kompilieren Fehler.
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 Result&
Result = ShellExecute(Me.hwnd, "Open", _
"http://www.foobar.de", "", App.Path, 1)
End Sub
Bei ShellExecute sagt mir der Compiler das hwnd nicht bekannt ist.
Jemand eine/n Lösung/Rat?
Please also mark the comments that contributed to the solution of the article
Content-Key: 43716
Url: https://administrator.de/contentid/43716
Printed on: April 25, 2024 at 12:04 o'clock
2 Comments
Latest comment