It seems when I want something explained in a complex way I find examples that only show the barest of minimum steps, and then the reverse is also true. I've spent several days on this problem too.
I have one simple hyperlink control and when the user clicks on it, I'd like a browser to open with the page indicated in the control.
I find all kinds of examples scrolling through this or that or appending text to this or that. I just want to launch a darn page. I've done menus and hyperlinks for years in Access and VB 6.0, I just don't know what I'm doing wrong in VB 2005. Sheesh! Oops, sorry for venting.Any advice would be greatly appreciated, I've already searched high and low, not sure what I'm missing.
Here is my glamorous code:
VB Code:
Private Sub llHyperlink_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles llHyperlink.LinkClicked 'www.microsoft.com is also the text of the hyperlink control. Dim url As String = "www.microsoft.com" Dim browser As WebBrowser 'the text must stay white for all states of the click events, "not visited, visited, etc." browser.Navigate(url) End Sub




Any advice would be greatly appreciated, I've already searched high and low, not sure what I'm missing.
Reply With Quote