Right click on menu in system tray

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
10 posts Page 1 of 1
Contributors
User avatar
Mark
VIP - Donator
VIP - Donator
Posts: 372
Joined: Mon Aug 17, 2009 10:35 pm

Right click on menu in system tray
Mark
Hello
I was wondering if anyone has a tutorial on how to load my text file called mark.txt with the info like this inside

Test
Test
Test
Tester
Games
Vb

I want them to load in to a menstrual or a content menu if possible?

Thanks

Mark
http://www.mbappz.com
User avatar
Smiley
VIP - Donator
VIP - Donator
Posts: 269
Joined: Sat Dec 19, 2009 3:39 pm

Hi Mark i made a little test app that does as you described hopefully it helps.


This file is hosted off-site.

Stay classy, Smiley cooll;
User avatar
Mark
VIP - Donator
VIP - Donator
Posts: 372
Joined: Mon Aug 17, 2009 10:35 pm

Re: Right click on menu in system tray
Mark
hello
Smiley I cant seem to open it as its done in a different version of vb I use 2010 can you change it to that version please?
http://www.mbappz.com
User avatar
Smiley
VIP - Donator
VIP - Donator
Posts: 269
Joined: Sat Dec 19, 2009 3:39 pm

Sorry about that Mark could you give this a try http://stackoverflow.com/a/24070718 if it doesnt work let me know and i'll upload a new 2010 compatible source.
User avatar
Mark
VIP - Donator
VIP - Donator
Posts: 372
Joined: Mon Aug 17, 2009 10:35 pm

Re: Right click on menu in system tray
Mark
Hello Smiley,

Ive tried what you said and been successful.

Was wondering if you tell me how to open up my internet explorer b browser with the selected item from the context management system.

I tried this but doesn't work

Private Sub ContextMenuStrip1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ContextMenuStrip1.Click

Process.Start(Me.ContextMenuStrip1.Text.ToString)

End Sub
http://www.mbappz.com
User avatar
Smiley
VIP - Donator
VIP - Donator
Posts: 269
Joined: Sat Dec 19, 2009 3:39 pm

Mark wrote:
Hello Smiley,

Ive tried what you said and been successful.

Was wondering if you tell me how to open up my internet explorer b browser with the selected item from the context management system.

I tried this but doesn't work

Private Sub ContextMenuStrip1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ContextMenuStrip1.Click

Process.Start(Me.ContextMenuStrip1.Text.ToString)

End Sub
Do you mean you want to search the item in internet explorer? Or is the item a URL that you want to navigate to in Internet Explorer?
User avatar
Mark
VIP - Donator
VIP - Donator
Posts: 372
Joined: Mon Aug 17, 2009 10:35 pm

Re: Right click on menu in system tray
Mark
It's a url
http://www.mbappz.com
User avatar
Smiley
VIP - Donator
VIP - Donator
Posts: 269
Joined: Sat Dec 19, 2009 3:39 pm

Mark wrote:
It's a url
Process.Start("iexplore.exe", Me.ContextMenuStrip1.Text.ToString)
cooll;
User avatar
Mark
VIP - Donator
VIP - Donator
Posts: 372
Joined: Mon Aug 17, 2009 10:35 pm

Re: Right click on menu in system tray
Mark
Hello,
tried what u said and I now receive this error message.
Code: Select all
    Private Sub ContextMenuStrip1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ContextMenuStrip1.Click
        Process.Start(Me.ContextMenuStrip1.Text.ToString)
    End Sub
Thanks

Mark
You do not have the required permissions to view the files attached to this post.
http://www.mbappz.com
User avatar
Smiley
VIP - Donator
VIP - Donator
Posts: 269
Joined: Sat Dec 19, 2009 3:39 pm

Mark wrote:
Hello,
tried what u said and I now receive this error message.
Code: Select all
    Private Sub ContextMenuStrip1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ContextMenuStrip1.Click
        Process.Start(Me.ContextMenuStrip1.Text.ToString)
    End Sub
Thanks

Mark
Whoa omg; i must have been out of my mind goofy; idoit; the code i gave you was way off.

Delete the whole ContextMenuStrip1.Click Event and paste this event in it's place
Code: Select all
    Private Sub ContextMenuStrip1_ItemClicked(sender As Object, e As ToolStripItemClickedEventArgs) Handles ContextMenuStrip1.ItemClicked
        Process.Start("iexplore.exe", e.ClickedItem.Text)
    End Sub
Sorry about that i dunno what i was thinking dunnno; cooll;
10 posts Page 1 of 1
Return to “Coding Help & Support”