473,835 Members | 2,112 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 2347
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
1883
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 using the balloon tip, and so when I replicated the program in python for use with
2
2530
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
4302
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 function properly and has exited, I cannot tell whether it is in a delay loop or has exited (as...
2
10773
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
3536
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
1453
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 notification should go away and a messagebox appears with the question if the user really wants to stop.
1
15896
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 would be really nice if I can add clickable links in that blaloon tip to open a window for details....
3
6704
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 NOTIFYICONDATAEX
0
9810
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10815
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10563
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
10237
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9348
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5640
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5808
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4435
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
3
3094
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.