473,394 Members | 1,703 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Killing a Shell_NotifyIcon balloon tip and powering on monitor in C#

Hi,

I have hunted round the web and managed to put together some code which
displays a balloon tip for a notification icon in the system tray when
I am running a windows service. This times out after about 10 seconds
if I move the mouse around the screen which is pretty much okay, but if
I don't do anything the balloon just stays showing for a long time. Is
there a method to kill this balloon tip without killing the whole icon
(a method I have temporarily employed is making the icon invisible and
then making it visible again the next time I want to display a balloon
tip). Ideally, I would like the icon to remain so users are able to
see the service is running in the background.

Also, does anyone know how to power up the monitor when Power
Management has switched the monitor off from within code? I have tried
public const int WM_SYSCOMMAND = 0x0112;
public const int SC_MONITORPOWER = 0xF170;
public const int MONITOR_ON = 1;
public const int MONITOR_OFF = 2;

[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
static extern bool SendMessage(IntPtr hWnd, UInt32 Msg, int wParam, int
lParam);

[DllImport("user32.dll")]
static extern IntPtr GetDesktopWindow();

SendMessage(GetDesktopWindow(), WM_SYSCOMMAND, SC_MONITORPOWER, 1);

without success.

Regards,
Kieran Lee

Jan 12 '06 #1
1 2301
As is often the case, I sussed out the first part of my query moments
after sending the email by simply adding a timer and raising an even
when the timer elapsed.

Still stumped as to the power management though.

Jan 12 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Daniel Bickett | last post by:
Hi, The truth is I despise windows xp balloon tips. Well, not so much the balloon tips, but how they're used by the operating system: like I need my system tray to tell me when there are "unused...
2
by: Aki Niimura | last post by:
Hello everyone, I'm encountering a weird problem and couldn't find any Internet postings that are relevant to my problem and it seems coming from the Pmw Balloon widget inside. I have...
1
by: siliconpiNOSPAM | last post by:
Hi, I have a C# test program (setup as a console application) that runs a bunch of other programs like IE / etc. I run this program from a command window, the other windows cover the command...
2
by: Ahsan | last post by:
How can i show balloon box or balloon box tool tip in my vb.net application ? Balloon box tip is kinda tool tip you can see whn you try to rename a file or folder with invalid characters it...
2
by: Andrea V.F. | last post by:
I use the code below (VB.NET) to display a Popup balloon in the Tray Icon of my application. The balloon is displayed, but the timeout never happens and the balloon is always visible even if I...
0
by: Eric | last post by:
Hi, For my program I use the notification control to show the user at least an icon or if (s)he decides to, a balloon as wel with some info. In the balloon I have two linkbuttons en the problem...
1
by: MrNobody | last post by:
You know those little balloon tips that come out of your task bar- like for example when Windows warns you about window supdates being available? I'd like to create some of those from my C# app......
3
by: Ed Courtenay | last post by:
I need to be able to set the icon on a Notification Icon Balloon Tip (a balloon tip raised from the system tray), and I've had limited success so far. I've extended the standard NotifyIcon...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.