how to do when user press the link label, then show the url in the browser and run it?
Printable View
how to do when user press the link label, then show the url in the browser and run it?
In WebBorser control nthat may have on your form OR in any default browser that you may have installed on your system?
Also, what control do you use for your "link label" and where is the actual url comming from?
LinkLabel controls are .NET specific. Are you using .NET?
vb Code:
Private Sub Label1_Click() ShellExecute Me.hwnd, "OPEN", "url", vbNullString, vbNullString, 5 End Sub
That will open the site/url of your choice in the default browser using the ShellExecute API.
Doh! Just seen his signature stating its VS 2005
Thread Moved.
Code:Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
System.Diagnostics.Process.Start("http://vbforums.com")
End Sub
oops...I already use System.Diagnostics.Process.Start("http://vbforums.com")
I always found out exception...but now i have solution:
dun forget start with "http://" although your link do not have "http://"
thx for all help:p