473,385 Members | 1,396 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,385 software developers and data experts.

application running in background and icon shown on the taskbar

Can anybody provide an example of how to program an application that can run
in the background and show only the icon on the taskbar?
Nov 17 '05 #1
4 1839
"Michael Yao" <Mi********@discussions.microsoft.com> wrote in message
news:60**********************************@microsof t.com...
Can anybody provide an example of how to program an application that can
run
in the background and show only the icon on the taskbar?


Well, it's quite easy to get an application to run in the background. You
simply choose to display no windows. If by "icon in the taskbar" you mean
the half-size ones that appear near the clock, you ask the shell to put one
there. Explorer provides the Shell_NotifyIcon() function to manipulate the
icon's in its tray.

There is a sample here:

http://msdn.microsoft.com/library/de...smptraynot.asp

It is an unmanaged sample (i.e. native C++). If you are looking for an
example under .Net, just so say and someone will probably point you in the
right direction.

Regards,
Will
Nov 17 '05 #2

Michael Yao wrote:
*Can anybody provide an example of how to program an application that
can run
in the background and show only the icon on the taskbar? *

taskbar or System Tray! anyways here is helper class to achieve
that!
http://www.codeproject.com/shell/systemtray.asp

--
thatsalok
------------------------------------------------------------------------
Posted via http://www.codecomments.com
------------------------------------------------------------------------

Nov 17 '05 #3
If you want to go the .NET Windows Forms Application route:
- Set FormBorderStyle to FixedToolWindow. (no alt-tab)
- Set ShowInTaskbar to false
- Set Opacity to 0% and WindowState to Minimized (without opacity 0%, you'll
see the minimzed window)
- Add a notifyIcon to the form, set its icon, and add some sort of
application exiting ability to it.

"Michael Yao" <Mi********@discussions.microsoft.com> wrote in message
news:60**********************************@microsof t.com...
Can anybody provide an example of how to program an application that can
run
in the background and show only the icon on the taskbar?

Nov 17 '05 #4
James Park wrote:
If you want to go the .NET Windows Forms Application route:
- Set FormBorderStyle to FixedToolWindow. (no alt-tab)
- Set ShowInTaskbar to false
- Set Opacity to 0% and WindowState to Minimized (without opacity 0%, you'll
see the minimzed window)
- Add a notifyIcon to the form, set its icon, and add some sort of
application exiting ability to it.

What if we make the thread in which the form is used (presumably the main thread) a
background thread (by setting the IsBackground property to true)? Will this change again,
if we select the window while running?
Nov 17 '05 #5

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

Similar topics

0
by: Huw Lloyd | last post by:
I am trying to develop a small VB.NET server application that runs in the background and places an icon in the Windows Taskbar. When the user double clicks on the taskbar icon the application...
3
by: Sam | last post by:
I've been googling for a couple of hours now and tried some different things, but I've been unable to get the icon for a distributed access application to do anything but display the default...
0
by: Morten Wennevik | last post by:
Hi, When setting ShowInTaskBar = false, the icon in the task-switching window (ALT-TAB) is changed to the default blank window icon. Is there a way to keep the original program icon when it's not...
2
by: Elad Gutman | last post by:
Hi Everyone, I'm facing an annoying problem and any help will be most appreciated . .. . I have a main application form and its icon is functioning excellent: it appears both in the taskbar...
4
by: Beenish Sahar Khan | last post by:
I want to start my application so that its notify icon is added to the system tray, i don't want to show any starting form. I want user to interact through the notify icon...just like MSN. Is there...
2
by: Flo | last post by:
Hello I want to be able to show/hide an application that is running. When i am getting the handles corresponding to an MS Office application (Excel for example), it appears that i get a handle...
2
by: Randall Powell | last post by:
I am in the process of developing a Windows Service which will: (1) monitor multiple network shares; (2) marshal text file transfers into an SQL Server 2000 instance; and (3) provide messaging...
0
by: Mike | last post by:
Greetings, I have an application that is launched and controlled (hide or show) via DDE messages from another application. The first time the application is launched it shows as it should and...
17
by: Bodyboarder20 | last post by:
Hello! So im working on an applicaiton that all pretty much sits on a single form. When the application completes a task, I'd like it to use FlashWindow() to notify the user that it has...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
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...

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.