Home > Software engineering >  Can be in the form with the default browser to open the web site
Can be in the form with the default browser to open the web site

Time:10-08

Can be in the form with the default browser to open the web site? Not all of them are open ie

CodePudding user response:

With the shell

CodePudding user response:

Can some concrete? Best post code, thank you

CodePudding user response:


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
'statement

Private Sub Command1_Click ()
Dim r As Long
R=ShellExecute (0, "open", "http://www.baidu.com", 0, 0, 1)
End Sub

Private Sub Command2_Click ()
Dim the url As a String
Url="http://www.baidu.com"
Shell "CMD. Exe/c start" & amp; Url, 0
End Sub

CodePudding user response:

The Shell method just opened, cannot open in your Form,
  • Related