如果一个文本框里面输入的是一个网址
我想问如何分别用ShellExecute和
System.Diagnostics.Process.Start
方法打开此链接
还有就是在ShellExecute(byval hwnd as long,,,,,,)
第一个参数在VB.NET中如何设置?
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
System.Diagnostics.Process.Start("iexplore", "www.sohu.com")
End Sub
可以直接这样写:
System.Diagnostics.Process.Start("http://www.sohu.com")
搞不懂为什么非要用shellexecute这个API函数了。DONET框里已经给你PROCESS这个命名空间了。可以直接开来了为什么还要用API了。
System.Diagnostics.Process.Start("http://www.sohu.com")