Click here to Skip to main content
15,881,757 members

NotifyIcon - always show icon?

Rokas Gustys asked:

Open original thread
Hello, I have an app I'm working on that runs in the background and I have a NotifyIcon in the system tray, which I use to notify the user of some things. But now I came to a little problem.

I want to be able to always show the icon next to the system icons, i.e. Action centre, network, sound. And not hidden with other apps whereby you have to click the up arrow to show them.

If your not sure what I mean, there is this thing in control panel under Notification Area Icons which allows you to change what each icon can do, i.e. 'Show icon and notification', 'Hide icon and notifications' and 'Only show notification' <-- that's a Windows 7 example, I don't know how it would be in XP or Vista. But that is basically what I want to do. I want to programmatically set my application to 'Show icons and notifications'.

I know it's possible! I've seen it in action. A program named DropBox - once installed it automatically appears next to the clock and it's icon is always shown.

Here is an image example of how I want it to be: (The arrow shows my application)

http://i719.photobucket.com/albums/ww199/Pk_King_X11/NotifyIconExample.png

------------------------------------------------------------------

EDIT: Please goto: "Control Panel\All Control Panel Items\Notification Area Icons" (Windows 7)

^ You will see each icon has a behaviour, I want to set mine to 'Show icon and notifications' programmatically. I know it is possible... DropBox has done it.

EDIT 2:

OK, now I see how it works. Programs like DropBox and some Anti-Viruses basically change their icon's position in the tray... By changing it to 0 or 1 which ever is the first one, basically puts them right next to the clock, thus automatically changing the Notification Area Icons settings to 'Show icon and notifications', now that's pure genius...

But then comes a question. How could I achieve this?
Tags: Visual Basic (Visual Basic 10)

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900