Subject: Console App Notify Icon Events
Posted By: invid Post Date: 1/21/2006 2:53:47 PM
I am building a concole based IRC bot, and would like to be able to hide it to the system tray. I am using the WinConsole class which allows me to hide/show the console window. And I have dynamically added a NotifyIcon to the project and it displays properly. I have dynamically created an event for it as well:


        // tray icon
        oIco.Icon = new System.Drawing.Icon(Directory.GetParent(System.Reflection.Assembly.GetEntryAssembly().Location) + @"\MainTray.ico");
        oIco.Visible = true;
        oIco.MouseClick += new System.Windows.Forms.MouseEventHandler(oIco_MouseClick);


My problem is the event doesn't fire, I have placed a break point in the event to test this. Is there a way to get a NotifyIcon's mouse events to work in a Console application project?

Thanks!

Go to topic 39010

Return to index page 389
Return to index page 388
Return to index page 387
Return to index page 386
Return to index page 385
Return to index page 384
Return to index page 383
Return to index page 382
Return to index page 381
Return to index page 380