Windows Develop Bookmark and Share   
 index > Windows Forms General > how to make right click menu on a notification tool in a windows application using vb?
 

how to make right click menu on a notification tool in a windows application using vb?

in the code below a show the notificationballoon every time i recive an email, now I want to a menu (when I right click on the notification icon).

can some one help me with this pls

'this method is used for populate data from the database and pop up the notification tool

Private Sub populatedata()

Me.Rsp_populatecountTableAdapter1.Fill(Me.MailServicesDataSet2.rsp_populatecount)

If pendingemailresults.Text = "0" Then

'label()

NotifyIcon1.Visible = False

Else

Me.Rsp_populatecountTableAdapter1.Fill(Me.MailServicesDataSet2.rsp_populatecount)

NotifyIcon1.Visible = True

NotifyIcon1.BalloonTipIcon = ToolTipIcon.Info

NotifyIcon1.BalloonTipTitle = "Pending Email/s:"

NotifyIcon1.BalloonTipText = "You have " + pendingemailresults.Text + " pending email/s"

NotifyIcon1.ShowBalloonTip(6000)

My.Computer.Audio.Play("c:\WINDOWS\MEDIA\Notify.wav", AudioPlayMode.WaitToComplete)

'label()

End If

End Sub

LukeXiki  Friday, October 31, 2008 3:17 PM
Just drag ContextMenuStrip to the designer. Then select the notification icon on the designer. Go to the properties and set the ContextMenu property to the ContextMenuStrip you just added. You code for ContextMenuStrip

like any other menu objects.

JRQ  Friday, October 31, 2008 6:06 PM
Notification Icon has a ContextMenu property that you can set. Add a ToolStripContextMenu and assign it to theNotification Icon.

JRQ  Friday, October 31, 2008 3:55 PM

i know that there is a ToolStripContextMenu but i don't know exactly how to use it

can someone help me pls

LukeXiki  Friday, October 31, 2008 4:30 PM
Just drag ContextMenuStrip to the designer. Then select the notification icon on the designer. Go to the properties and set the ContextMenu property to the ContextMenuStrip you just added. You code for ContextMenuStrip

like any other menu objects.

JRQ  Friday, October 31, 2008 6:06 PM

You can use google to search for other answers

Custom Search

More Threads

• I can't key in after MaskedTextBox is set in the source.
• Splash screen behavior question
• Accessing application args array inside a .NET form
• The case of the disappearing combo box
• Problem with Object-binding to a combobox in Winforms. (Possible Framework error?)
• Textbox validation
• Converting a file to an UNKNOWN APPLICATION HELLP!!
• Capturing the mouse
• How to add controls?
• How do i make a Wizard that appears only the first-time ?