473,587 Members | 2,489 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Killing a Shell_NotifyIco n 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("user 32.dll")]
[return: MarshalAs(Unman agedType.Bool)]
static extern bool SendMessage(Int Ptr hWnd, UInt32 Msg, int wParam, int
lParam);

[DllImport("user 32.dll")]
static extern IntPtr GetDesktopWindo w();

SendMessage(Get DesktopWindow() , WM_SYSCOMMAND, SC_MONITORPOWER , 1);

without success.

Regards,
Kieran Lee

Jan 12 '06 #1
1 2319
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
1870
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 icons" on my desktop, or that "local disk" has less than 200 mb of free space. But I digress I liked the way GTray told me when I had new mail...
2
2516
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 developed a Tkinter software using Pmw. The software is being developed under Solaris but is targeting all
1
4286
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 window and I cannot see the log being generated. In the program execution, there are lots of delays necessary and many times when the program fails to...
2
10736
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 poped up. any kinda help will be appriciated. Thank you
2
3524
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 set it. Where is the error?? Please Help me. Thanks. Imports System.Runtime.InteropServices Public Class ClsNotifyBalloon
0
1440
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 comes when the user taps on one of them. One linkbutton is to show a form, the other is to stop the program. After tapping on STOP the...
1
15883
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... Can you tell me how? I want to use it to notify users of an event while my program is running in the background (possibly as a service) and it...
3
6688
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 component (well, read disassembled using Lutz Roeder's fantastic tool and rebuilt); I've added a new Structure like this: public class...
0
7923
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7852
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8216
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7974
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6629
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3845
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3882
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2364
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1455
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.