PDA

Click to See Complete Forum and Search --> : system tray utility


sephatine
Jun 14th, 2002, 10:39 AM
First off, pardon my ignorance. I'm new to the development scene and have just been reading through the vb .net intro book. I however have a tendancy to want to get ahead of myself :), and since I have a few weeks until my next class starts, I thought I'd see if anyone could give me a few pointers.

I'm trying to build a small system tray icon, using the example as a basis for it. I would like to have the right click menu and then have the option to call a program, and a url from the menu options.

Here's the code I've got so far. I'll be rewriting the code for practice once I've figured out the details though. Here's my code currently.


***********
'Insert all MenuItem objects into an array and add them to
'the context menu simultaneously
Dim mnuItms(3) As MenuItem
mnuItms(0) = New MenuItem("Options...", New EventHandler(AddressOf Me.ShowFormSelect))
mnuItms(0).DefaultItem = True
mnuItms(1) = New MenuItem("Toggle Image", New EventHandler(AddressOf Me.ToggleImageSelect))
mnuItms(2) = New MenuItem("USI CNA")
mnuItms(3) = New MenuItem("Players Site")
mnuItms(4) = New MenuItem(-)
mnuItms(6) = New MenuItem("Exit", New EventHandler(AddressOf Me.ExitSelect))
Dim notifyiconMnu As ContextMenu = New ContextMenu(mnuItms)
notifyicon.ContextMenu = notifyiconMnu
End Sub
***************

Sephatine