Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 21st, 2006, 03:53 PM
Registered User
 
Join Date: Jan 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Console App Notify Icon Events

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:

Code:
        // 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!





Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ console app barrytn Visual C++ 2005 2 July 11th, 2008 02:11 AM
Schedule a console app hamilton General .NET 1 January 5th, 2007 10:50 AM
is making console app using C# a waste rahulmballal BOOK: Professional C#, 2nd and 3rd Editions 0 January 25th, 2005 11:13 AM
invisible console app asmotritsky Visual C++ 1 November 25th, 2004 03:27 PM
Console events...?! jacob C# 2 February 16th, 2004 06:23 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.