Link in a MenuStrip

Im trying to creat a link inside a menustrip. Is this possible and if so what would the code be that i insert.


PrivateSub SocomIIUSNavySealsOnlineToolStripMenuItem_Click(ByVal senderAs System.Object,ByVal eAs System.EventArgs)Handles SocomIIUSNavySealsOnlineToolStripMenuItem.Click

' I need thise to point to a web site.

EndSub


[1418 byte] By [phousley17] at [2007-12-16]
# 1
Using your example...

I've set it up assuming that the text on the menu strip is the website adress. You can change this really easily though.



Private Sub SocomIIUSNavySealsOnlineToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SocomIIUSNavySealsOnlineToolStripMenuItem.Click

Dim pr As New Process
pr.StartInfo.FileName = SocomIIUSNavySealsOnlineToolStripMenuItem.Text
pr.Start()

End Sub

Hope this helps!

Dustin.

Dustin_H at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2
Sorry but i must ask how do i change it. Say i need it to point to the website http://www.msn.com

how would i do that.

I tried dimming a new string and then putting the web address in the string. Then instead of using the text of the menu item as the filename i would use the string. I got a WIN32Exception error though.

phousley17 at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3
Nevermind. I put the .ToString in on accident.

Thanx alot.
If anyone else needs helpo with this and needs the code it is as follows.


Private Sub SocomIIUSNavySealOnlineToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SocomIIUSNavySealsOnlineToolStripMenuItem.Click
Dim pr As New Process
Dim Site As String = "YourSiteHere.com"
pr.StartInfo.FileName = Site
pr.Start()

End Sub

phousley17 at 2007-9-9 > top of Msdn Tech,Visual Basic,Visual Basic General...