Page 1 of 1

Right click on menu in system tray

Posted: Wed Feb 04, 2015 8:29 am
by 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

Re: Right click on menu in system tray

Posted: Wed Feb 04, 2015 11:17 am
by Smiley
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;

Re: Right click on menu in system tray

Posted: Wed Feb 04, 2015 12:06 pm
by 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?

Re: Right click on menu in system tray

Posted: Wed Feb 04, 2015 12:19 pm
by Smiley
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.

Re: Right click on menu in system tray

Posted: Thu Feb 05, 2015 12:08 am
by 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

Re: Right click on menu in system tray

Posted: Thu Feb 05, 2015 2:16 am
by Smiley
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?

Re: Right click on menu in system tray

Posted: Thu Feb 05, 2015 3:33 am
by Mark
It's a url

Re: Right click on menu in system tray

Posted: Thu Feb 05, 2015 4:03 am
by Smiley
Mark wrote:
It's a url
Process.Start("iexplore.exe", Me.ContextMenuStrip1.Text.ToString)
cooll;

Re: Right click on menu in system tray

Posted: Thu Feb 05, 2015 9:33 am
by 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

Re: Right click on menu in system tray

Posted: Thu Feb 05, 2015 11:15 am
by Smiley
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;