473,606 Members | 3,113 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

systray app - help

Hello,

Im quite new to c# windows application.

i need to write a application which stays on the systray and listens to the
SQL Table. (when the value is inserted as 0 - done thru Dataset and check it
every2 seconds?) i need to open another application thru command prompt and
pass the parametes of the DB and alert the user.

how this can be done?

any links? sample app?

anyhelp in this regard is much appreciated.

Thanks.

Aug 25 '06 #1
2 1883
Im not sure how close c# is to vb but you can make a
windows form with an opacity of 0 on it, and have a notify icon on it,
drop a timer on the form and let the timer execute some code every ( so many
seconds you need ).

At this point ur basically dealing with a form that the user cant see so
really u can do anything.

In the timer you can just open a prog once ur result is true.

?

Miro
"Arvi" <ar**@cti.comwr ote in message
news:uq******** ******@TK2MSFTN GP02.phx.gbl...
Hello,

Im quite new to c# windows application.

i need to write a application which stays on the systray and listens to
the
SQL Table. (when the value is inserted as 0 - done thru Dataset and check
it
every2 seconds?) i need to open another application thru command prompt
and
pass the parametes of the DB and alert the user.

how this can be done?

any links? sample app?

anyhelp in this regard is much appreciated.

Thanks.

Aug 25 '06 #2
Hi Miro,

No Form necessary. Here's an example without the Timer:

static void Main()
{
// create and initialize icon component
NotifyIcon icon = new NotifyIcon();
icon.Text = "My Tray Icon";
icon.Icon = System.Drawing. SystemIcons.App lication;

// create context menu
icon.ContextMen uStrip = new ContextMenuStri p();
icon.ContextMen uStrip.Items.Ad d("&Exit");
icon.ContextMen uStrip.Items[0].Click +=
// Handle the click event for the Exit item.
// An anonymous method is used to handle the event in order to shorten this example
(EventHandler) delegate(object sender, EventArgs e) { Application.Exi t(); };

// show icon
icon.Visible = true;

// start message loop (this line of code blocks until the application stops)
Application.Run ();
}

--
Dave Sexton

"Miro" <mi******@golde n.netwrote in message news:%2******** ********@TK2MSF TNGP05.phx.gbl. ..
Im not sure how close c# is to vb but you can make a
windows form with an opacity of 0 on it, and have a notify icon on it,
drop a timer on the form and let the timer execute some code every ( so many seconds you need ).

At this point ur basically dealing with a form that the user cant see so really u can do anything.

In the timer you can just open a prog once ur result is true.

?

Miro
"Arvi" <ar**@cti.comwr ote in message news:uq******** ******@TK2MSFTN GP02.phx.gbl...
>Hello,

Im quite new to c# windows application.

i need to write a application which stays on the systray and listens to the
SQL Table. (when the value is inserted as 0 - done thru Dataset and check it
every2 seconds?) i need to open another application thru command prompt and
pass the parametes of the DB and alert the user.

how this can be done?

any links? sample app?

anyhelp in this regard is much appreciated.

Thanks.


Sep 15 '06 #3

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

Similar topics

3
1548
by: Yo | last post by:
I want to put an icon in the systray. I don't think VBA does this. Is there a VC++ or C++ Function or Sub that I can declare that will allow me to create a systray icon (or is it windows_notification_area)? Thanks in advance, Yo.
6
9908
by: Action | last post by:
I can add a systray icon in normal windows application... but when i do it in windows service, the systray icon just don't show up is that because i don't have any "component" to contain the systray icon? please give direction... thx
3
5486
by: Jon Bosker | last post by:
I have written an application that lives in the systray but when I try to close windows or logout it does not close my application and therefore prevents windows from shutting down or logging me out. It is essential that I solve this problem but I have run out of ideas can anyone help (please!) The application starts in Start.cs which kicks off the Systray form using this call: Application.Run(new Systray());
4
491
by: mario | last post by:
How to put an application in systray with F1 or any shortcut button?
1
4152
by: Christoph Engelhardt | last post by:
Hi newsgroup, What I intend to do: Write a small programm, that will add a new Button to every Window right beside the Buttons for minimizing, maximizing and closing the window in the window's titlebar. When this button is clicked the window itself should be minimized to the systray On my way there I found hardly any example via Google that suited my needs. All I know about already is how to get all windows in VB.Net ( which
3
2103
by: Erik Greene | last post by:
I have written an application that contains a notifyicon that will not dispose or end when Windows shutsdown. I have seen other posts where people are experiencing the same issue (see post in the csharp group), so I know that this is an issues for others as well. Does anyone know how to capture the Windows Exit/Shutdown event?
3
1078
by: parth_mca | last post by:
i hv an application (socket programming) and i want when the client application receives a message it should popup from the systray.. so i want to run my application in systray..can ne 1 help me?
0
1822
by: kapcreations | last post by:
I have a system tray app which gets the status of a windows service, and displays the appropriate icon for the status of the service in the systray. the problem I am having is the icon disapears under certain conditions, but the exe is still listed in the processes leading me to believe the app is still running. It fires up perfectly on boot, however if the user logs off, and then logs back in (not reboot), or if the system goes to...
8
2652
by: Rob R. Ainscough | last post by:
I have a VS 2005 Windows Service with a Installer project as part of my solution. The Service installs fine but I can't seem to make either of these work: 1. Have the service start after install 2. Have the service interact with the SysTray In my ProjectInstaller.vb Private Sub ServiceInstaller1_AfterInstall(ByVal sender As
2
1815
by: Arvi | last post by:
Hello, Im quite new to c# windows application. i need to write a application which stays on the systray and listens to the SQL Table. (when the value is inserted as 0 - done thru Dataset and check it every2 seconds?) i need to open another application thru command prompt and pass the parametes of the DB and alert the user. how this can be done?
0
8461
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...
0
8448
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8126
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
6796
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
3948
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
4010
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2454
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
1572
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1313
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.