![]() |
|
[.NET] [VB.NET]How to Attach Context Menu with System Tray Icon - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] [VB.NET]How to Attach Context Menu with System Tray Icon (/showthread.php?tid=407230) |
[VB.NET]How to Attach Context Menu with System Tray Icon - codepoet - May 7, 2010 Author: DevASP Tutorial: Crow407 In this simple tutorial you will learn that how can you attach context menu with system tray icon and also do tasks on click of this icon. Create a New Project in VB.Net. Drag a NotifyIcon, Timer and Context menu from tool box and place on form. Now create options on the context menu like simple menu. Now start writing code on different events . Declare Global variables: Code Dim icon1 As New Icon("ac0036-48.ico")Write code on from load event: Code Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.LoadWrite code on timer tick event: Code Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.TickNow write code on context menu items: Code Private Sub MenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem1.ClickIf You Like this tutorial, please check out my other tutorials by clicking ==> H3R3
[img]http://i685.photobucket.com/albums/vv215/blackpearl4/THANKS.gif[/img]
* - Scrat - May 7, 2010 Thankssss this is going to be very useful!!! I was searching for this for long time... * - TehShrink - May 7, 2010 Knew this already. But good tutorial, good job! * - codepoet - May 7, 2010 (May 7, 2010 02:22 PM)Ma3x*Ne0 Wrote: Thankssss this is going to be very useful!!! I was searching for this for long time... glad i could help.... (May 7, 2010 02:26 PM)TehShrink Wrote: Knew this already. But good tutorial, good job! thank you * - Troxin - May 7, 2010 I will need this sometime :D I was just fucking around on a blank project trying to get this to work, but couldn't do it :P * - codepoet - May 7, 2010 well you have to rewrite some parts of it to meet your needs... |