Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Avoiding System Tray Icon Appearence


Hello,

I have a program with one of those routines to put an icon on the system tray with right click options. All code is in form3. I start the program with form1 in which the user can eventually go to form2. At form2 the user can go to form3. Only at this time I want the icon in the system tray, but that's not what is happening. As soon as I start the program the system tray icon appears, which makes no sense to my program. How can I solve this? I also don't understand why the icon shows up as soon as the program start because the code for the system tray icon is not yet loaded (is at the load event in form3).

Thanks




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
*Resolved* Removing Taskbar Icon In Run-time (NOT System Tray Icon)
I wrote my own mp3 player ('cause Winamp sucks ), and one of the features is a very small, unobtrusive window:

I need to remove the taskbar icon, 'cause it looks dumb with a blank icon among the others.

Anyone have any ideas? All searches keep pointing to system tray icons

___________________________
Dave Applegate
Microsoft VB MVP, ACE [FAQs]
My friend has a trophy wife, but apparently she wasn't in first place.

Edited by - Metallisoft on 3/15/2004 1:39:05 PM

What's In The System Tray (Not Putting A Icon In The Tray)
Does anyone know of a way to find out what icons are registered and retrieve their NOTIFYICONDATA.  Or if you can't find out which ones are already in the tray do you know of a way to be notified when new icons are added using Shell_NotifyIcon?



Show Icon In System Tray When My System Starts
Hi all

I have done an application in VB6 which when minimized sits in the system tray.
Till this point its working fine.
but i need to do some more modification for this.

I want the application Icon to appear in the system tray when the system(CPU) starts (like yahoo messenger icon sits in sytem tray as soon as the system starts).

can anyone help me with the code.

Thanks in advance.

regards
Rajmv

Icon In System Tray
hello everybody ,
i have two questions :
1) how can i add an icon of my vb project executable to the system tray ? ( i am using package and deployment wizard)

2) is there any way that i can detect if a file is just been opened or run on my computer i.e if a .avi file is being opened i want to detect this event.

thanks in advance.

App Icon To System Tray?
Hello

I want to know how to put my application icon to system tray. Can anybody give me an example code?

Thanks in advance.

Regards

ATWin

System Tray Icon
I've been working with this system tray icon that I found online.
The picture it's self is stored in a property called "TrayIcon". The type is StdPicture.

I was wondering how I could change the Icon at run time. The LoadPicture function returns a variable of type IPictureDisp, so it doesn't work, I've tried. I've tried ICO files and GIF files.

System Tray Icon
Hai friends.

My programs loads to system tray at windows startup.

After loading xp, on few occations the icon is not shown in tray. but i can see the program running in Task Manager.

[vbcode]
With icodata
.cbSize = Len(icodata)
.hwnd = Me.hwnd
.hIcon = Me.Icon
.szTip = "My program name and version" & Chr$(0) '0 is for truncate
.ucallbackMessage = WM_LBUTTONDOWN
.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
.uId = 1
End With
Shell_NotifyIcon NIM_ADD, icodata
[/vbcode]

Any thing wrong with the codes?
if not what could be the problem you think?

It is remarkable that i have not add any flags to the oprograms startup entry path. i.e. -osboot , /STARTUP , -quiet

System Tray Icon
i have a simple application.

i would like to put an icon of that application in the sistem tray when the user try to close it with the X button.
And to unload it only if the user right click on the system tray icon choosing exit in the menu...



Anyone knows an example of this?

System Tray Icon
how do i get it so that when the user presses the minimize button my prog minimizes to the system tray and not the task bar?

Put Icon In System Tray
How do I put my program's icon in the system tray and have a popup menu come up when you right click on it?

System Tray Icon
I wanna put a icon in the system tray i tryed the tutorial but i cant do that cause i only got 1 CD and it hasnt got it on it and i have downloaded other projects wif stuff on it but i didnt under stand it can someone help me out please

How To Have A System Tray Icon?
I have an application which when running it has a task bar associated to it but I do not know how to make a system tray icon for it and just keep it and un-show the task bar. Something like the winamp, like when you close it the task bar would go away but the system tray icon would remain. How can I achieve this?

System Tray Icon
I have a problem with my systemtray icon. I have been working on it for a while. i fixedone prolem and go t another. Enough rattling.

First let me say I'm using a MDI Form and a child form. I currently hae three ways to exit the application: through a menu bar, a popup menu that you get when right-clicking on the app's systemtray icon, and throught the Close button "X" at the top right of the MDI Form. The icon is unloaded successfully except when I use the Close button "X" at the top right of the MDI Form. When I use the close button the icon stays in the system tray until the user moves the mouse over the icon. Then it disappears. The thing that gets me is that I'm using the exact same code in the other unload event and exit event and it works just fine.

Any help would be great.

Thanks,

Animaul


This code is on the MDI from
Private Sub mnuClose_Click()
removeIcon
End Sub


Private Sub MDIForm_Load()
' 'the form must be fully visible before calling Shell_NotifyIcon
' frmMain.Show
With nid
.cbSize = Len(nid)
.hwnd = frmMain.hwnd
.uId = 1&
.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
.uCallBackMessage = WM_MOUSEMOVE
.hIcon = frmMain.Icon
'.szTip = "Your ToolTip" & vbNullChar
End With
Shell_NotifyIcon NIM_ADD, nid
End Sub

Private Sub MDIForm_Unload(Cancel As Integer)
'this removes the icon from the system tray
With nid
.cbSize = Len(nid)
.hwnd = frmMain.hwnd
.uId = 1&
End With
Shell_NotifyIcon NIM_DELETE, nid
' Unload frmMain
' Unload frmProgress
' Unload frmDBGrid
' Unload Me
End Sub


Public Sub mPopExit_Click()
'called when user clicks the popup menu Exit command
'this removes the icon from the system tray
removeIcon
End Sub

Private Sub mPopRestore_Click()
'called when the user clicks the popup menu Restore command
Dim Result As Long
Me.WindowState = vbNormal
frmMain.WindowState = vbNormal
Result = SetForegroundWindow(Me.hwnd)
Me.Show
End Sub

Private Sub removeIcon()
With nid
.cbSize = Len(nid)
.hwnd = frmMain.hwnd
.uId = 1&
End With
Shell_NotifyIcon NIM_DELETE, nid
End Sub
****************************************************

This code is on the child form:

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
' 'Event occurs when the mouse pointer is within the rectangular
' 'boundaries of the icon in the taskbar status area.
' 'this procedure receives the callbacks from the System Tray icon.
Dim Result As Long
Dim Msg As Long
'the value of X will vary depending upon the scalemode setting
Msg = X / Screen.TwipsPerPixelX
Select Case Msg
Case WM_LBUTTONUP '514 restore form window
frmMain.WindowState = vbNormal
Result = SetForegroundWindow(mfrmMain.hwnd)
frmMain.Show
Case WM_LBUTTONDBLCLK '515 restore form window
frmMain.WindowState = vbNormal
Result = SetForegroundWindow(Me.hwnd)
frmMain.Show
Case WM_RBUTTONUP '517 display popup menu
Result = SetForegroundWindow(Me.hwnd)
frmMain.PopupMenu mfrmMain.mPopupSys
Case WM_LBUTTONDBLCLK 'restore application
frmMain.WindowState = vbNormal
Result = SetForegroundWindow(mfrmMain.hwnd)
mfrmMain.Show
End Select
End Sub

Private Sub Form_Unload(Cancel As Integer)
mfrmMain.mnuViewMain.Checked = False
If frmMain.Visible <> False Then
With nid
.cbSize = Len(nid)
.hwnd = mfrmMain.hwnd
.uId = 1&
End With
Shell_NotifyIcon NIM_DELETE, nid
End Sub

System Tray Icon
Is anyone familar with putting a Icon in the system tray? In particular the dll functions:

Private Declare Function GetDesktopWindow Lib "user32" () As Long

Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal
hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal _
lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd _
As Long) As Long

I get my icon in the system tray and a popup when I right click on the icon. Everything works but there is a glich. Here is the problem: I get the pop up menu that you get when right clicking on the system tray icon sperodically when moving the mouse around and clicking in the parent MDI form. Was this dll function not meant to be used with MDI forms?

The best I can figure from reading about the API functions is my problem lies in the MDIForm_MouseMove event. However, I have not been able to figure out where.

Any suggestions would be greatly appriciated.

Thanks,

Animaul

Here is my code:

Module

'links to the lib that allows error messages to be sent to the desktop
Private Declare Function GetDesktopWindow Lib "user32" () As Long
'links to the lib that allows a shell to be created
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long

'declaring flags for the shell application
Public Const SW_HIDE = 0
Public Const SW_NORMAL = 1
Public Const SW_SHOWMINIMIZED = 2
Public Const SW_SHOWMAXIMIZED = 3
Public Const SW_SHOWNOACTIVATE = 4
Public Const SW_SHOW = 5
Public Const SW_MINIMIZE = 6
Public Const SW_SHOWMINNOACTIVE = 7
Public Const SW_SHOWNA = 8
Public Const SW_RESTORE = 9
Public Const SW_SHOWDEFAULT = 10
Public Const SW_SHOWNORMAL = 1 ' aka SW_NORMAL

Public Function lngRunShell(ByVal strParm As String) As Long
'declaring variables
Dim lngErr As Long
Dim hWndDesk As Long
Dim strFile As String
Dim strAction As String

lngErr = 0
hWndDesk = 0
strFile = ""
strAction = ""

'the desktop will be the
'default for error messages
hWndDesk = GetDesktopWindow() 'sends error messages to the desktop

strFile = strParm '"C:WINDOWSsystem32
otepad.exe" ' the file you want to open/etc.
strAction = "OPEN" ' action might be OPEN, NEW or other, depending on what you need to do

lngErr = ShellExecute(hWndDesk, strAction, strFile, "", "0&", SW_SHOWNORMAL)
lngRunShell = lngErr
End Function

On MDI Form:

Private Sub MDIForm_Load()
'the form must be fully visible before calling Shell_NotifyIcon
mfrmMain.Show
'mfrmMain.Refresh
With nid
.cbSize = Len(nid)
.hwnd = Me.hwnd
.uId = vbNull
.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
.uCallBackMessage = WM_MOUSEMOVE
.hIcon = Me.Icon
'.szTip = "Your ToolTip" & vbNullChar
End With
Shell_NotifyIcon NIM_ADD, nid
End Sub

Private Sub MDIForm_MouseMove(Button As Integer, Shift As Integer, X As _
Single, Y As Single)
'this procedure receives the callbacks from the System Tray icon.
Dim Result As Long
Dim msg As Long
'the value of X will vary depending upon the scalemode setting
If mfrmMain.ActiveControl Then
msg = X
Else
msg = X / Screen.TwipsPerPixelX
End If
Select Case msg
Case WM_LBUTTONUP '514 restore form window
frmMain.WindowState = vbNormal
Result = SetForegroundWindow(Me.hwnd)
frmMain.Show
Case WM_LBUTTONDBLCLK '515 restore form window
frmMain.WindowState = vbNormal
Result = SetForegroundWindow(Me.hwnd)
frmMain.Show
Case WM_RBUTTONUP '517 display popup menu
Result = SetForegroundWindow(Me.hwnd)
frmMain.PopupMenu Me.mPopupSys
Case WM_LBUTTONDBLCLK 'restore application
frmMain.WindowState = vbNormal
Result = SetForegroundWindow(mfrmMain.hwnd)
mfrmMain.Show
End Select
End Sub

System Tray Icon
Hi
Does anyone know anywhere I can find information on putting my application icon in the system tray?. Been having a good look on the net and found a few articles but these articles date from around Year 2000-2005.

Just wondering if theres newer information on this that I can use to implement a system tray icon?.

Also from all the info I have read it seems like theres alot of code to get the system tray icon working. Anyways, any help is appreciated.

Thanks

System Tray Icon
Hello there,

I'm trying to make a system tray icon, i'm not sure how to. Also I want to dynamically change the information on the icon so it doesnt have to be an image I just want to show abit of text, is it possible to make it like a label? if so is there anyway I can make it dynamically change.

Icon In System Tray
how do i put my program's icon in the system tray?

Icon In System Tray
Hello....Does anyone know if there is an API call or something to put the notification icon in the system tray when a DUN is connected? I know you can do it manually, but in code....?

Thanking You

System Tray ICON
ok I figured out how to make the tray Icon ect.. but I want the from to not show only show in the systray icon,
and when it's pressed..

(when the from is mininized naturally. it's running in the background but not on your task bar, just on the systray icon.. so when Icon clicked the program maxizes



any ideas?

System Tray Icon
Right, boredom set in again (it's happened before folks ), so I rewrote that funky systray-icon-thingymajig-whatcha-wanna-call-it control.

Now, before I get all nice and post the source, would anyone like to have it? And, while I'm at it - would you be willing to pay a nice "developers fee" of say, um, US$10?
Coz you see, I've got to feed my 13.5142901 or so children


Anyway... here we go...


Brian

System Tray Icon
I want my application to show system tray icon when minimised. can anyone help me

System Tray Icon Bug?
Hey all,

I'm using a system tray icon in my app, but sometimes it doesn't go away until i run my mouse over it once the app has been exited. Is this a bug? Is there a fix?

ober5861
[edit]
I notice it mainly when running it from the development environment!?

[/edit]

System Tray Icon
hi,

How do I get my program to appear in the system tray when I press cmd_systray01 (button) ?


Thanks


and I need to be able to have a menu appear on when the right mouse button is clicke don it thanx

System Tray Icon
Forget my question, I got the answer!

System Tray Icon
Hi All,

I have an application that puts an icon in the system tray. The problem is that when I try to remove it, it does not disapear until you move your mouse pointer over it...

So I run ShellNotifyIcon, passing NIM_DELETE.. However the icon does not get removed..

Any Ideas?

Add System Tray Icon
I need help...

the code adds an icon to the system tray. Also there is a menu that works when used from the form...

sysTray
|
---Restore
|
---Exit

The problem is when I right click on the icon in the system tray, I get an error " popup menu must have at least one submenu"... There are 2 submenus (restore and exit)... what's the program's problem?

Any ideas?



CODE: attached



thanks

System Tray Icon? How To?
Does any body have any code that will display an Icon in the system tray on the desktop. And when you right click on it it will display a menu. etc...

Thanks I really appreciate it.
A simple running program would work great. Thanks.

System Tray Icon
How can I put operate my app at all times and create a
shortcut in the system tray and remove it from the task
bar?

Icon In System Tray
You should draw the text to that picturebox, use Print method, and cls to clear. Also set autoredraw to true

Help With A System Tray Icon
I have looked everywhere for ActiveX controls that add and manipulate an icon in the system tray. I have seen many excellent controls, but have seen none that have a MouseEnter and MouseExit event, so I can change the icon when the mouse moves over it and moves off it. And, in another note, I am looking for button controls that mimic the style of the controls in MS Money 9(something) and in MS Bookshelf. Any help on these two topics?

------------------
Arien Talabac, author of Tiny Clock, the skinnable alarm clock for Windows--check it out at http://tinyclock.tsx.org.

How Do I Put An Icon On The System Tray
How do I put an icon on the system tray

System Tray Icon Won't Appear
Hi,

I've got an application where i putted some lines of code to display an icon in the systray when the program runs. If I do it normally in Windows XP, it works great. The problem is that when Windows starts up, so does my program, the icon doesn't appear - even with the internal call.
Does someone knows how to fix this? Is there a way for me to find out if the icon is loaded or not ( in this last case I would run the call again )?

Regards,

Kepler

Icon In The System Tray
I have to create a project in vb
but its icon should be display
when minimized only in the system
tray not in the status bar

Please provide your ideas and suggestions or any samples

System Tray Icon FAQ
Evenin' all. Sorry if this question has been posted already if so please slap me in the direction of the thread ;).

My question is concerning getting a popupmenu to appear for my system tray icon as per the FAQ here.

http://www.vbcity.com/forums/faq.asp?fid=6&cat=Windows#TID3750

Now, its not the popup menu part that i dont understand, its the following:

Code:
Private Sub Form_Mousemove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    If X / Screen.TwipsPerPixelX = WM_LBUTTONDBLCLK Then
        Call Shell_NotifyIcon(NIM_DELETE, Trayicon)
        Me.Show
    ElseIf X / Screen.TwipsPerPixelX = WM_RBUTTONUP Then
        Me.PopupMenu mnuTray
    End If
End Sub


Ok above is my adaption of the code in the FAQ for when a user clicks on the icon in the system tray.

Problem:

X refers to the X coordinate of the mouse click.
Y refers to the Y coordinate of the mouse click.
WM_RBUTTONUP appears to be a constant for the right mouse button, stored as long.

So obviously there are multiple different places the user can hit the icon in the tray so X can be many different values.

My problem is basically that when X is divided by Screen.Twipsperpixel it is not equal to the number stored by WM_RBUTTONUP or any of my other buttons.

Now i had this working a few months ago and loaded up the project just there and now its all screwy and dont understand why. When i say working a few months ago it appeared that no matter where i clicked on the icon the value for "X" would always be the same but would only change depending on the type of mouse click or button.

Any ideas of what im doing wrong here? Thanks again guys!

___________________
Please may I have a cookie?

Edited by - Pulseammo on 2/6/2004 9:00:14 AM

System Tray Icon
I know there are a ton of sites on the net on how to make your program run in the system tray, but so far i havn't found any that i can understand.
If anyone would please point my to a helpful website, or post some code i would be very grateful.
thanks,
alex

How To Get An Icon On The System Tray
Hi to all of you,
I am developing a very simple application in pure VB6.0
The only thing I want when I start the computer , application will also start running and its icon will displayed on system tray.
Thanking you

Anjali

System Tray Icon
greeting vb masters. just want to ask, how can you make your program appear on your system tray as an icon. instead of appearing at your taskbar.

System Tray Icon Will Be Go Away
Hi guys,

In my project I have used code from the faq's on how to make my program go into sys tray however my problem is that for some reason i cannot get the icon out of the tray

The FAQ Link (its the first example)

Heres what i have


Main/Starting Form (which will use the sys tray)

Code:Option Explicit
'User-defined variable to pass to the Shell_NotiyIcon function
Private Type NOTIFYICONDATA
    cbSize As Long
    hWnd As Long
    uId As Long
    uFlags As Long
    uCallBackMessage As Long
    hIcon As Long
    szTip As String * 64
End Type

'Constants for the Shell_NotifyIcon function
Private Const NIM_ADD = &H0
Private Const NIM_MODIFY = &H1
Private Const NIM_DELETE = &H2

Private Const WM_MOUSEMOVE = &H200

Private Const NIF_MESSAGE = &H1
Private Const NIF_ICON = &H2
Private Const NIF_TIP = &H4

Private Const WM_LBUTTONDBLCLK = &H203
Private Const WM_LBUTTONDOWN = &H201
Private Const WM_LBUTTONUP = &H202
Private Const WM_RBUTTONDBLCLK = &H206
Private Const WM_RBUTTONDOWN = &H204
Private Const WM_RBUTTONUP = &H205

'Declare the API function call
Private Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" _
    (ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean
     
Dim nid As NOTIFYICONDATA


again in the same form
Code:Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

Dim msg As Long

    On Error GoTo ErrorHandler
     
    'Respond to user interaction
    msg = X / Screen.TwipsPerPixelX
    Select Case msg
             
        Case WM_LBUTTONDBLCLK
            'nothing
     
        Case WM_LBUTTONDOWN
            'nothing
         
        Case WM_LBUTTONUP
            If Me.WindowState = vbMinimized Then
                Me.WindowState = vbNormal
                Me.Show
            Else
                Me.WindowState = vbMinimized
                Me.Hide
            End If
             
        Case WM_RBUTTONDBLCLK
            'nothing
         
        Case WM_RBUTTONDOWN
            'nothing
         
        Case WM_RBUTTONUP
            Call PopupMenu(frmSysTray.mnuFile, vbPopupMenuRightAlign)
             
    End Select
     
Exit Sub
ErrorHandler: 'Display error message
    Screen.MousePointer = vbDefault
    MsgBox Err.Description, vbInformation, App.ProductName & " - " & frmMain.Caption

End Sub

in a module called module1(systray.bas

NB. for some reaons i had to copy this code into both the form and the module else i was getting errors?

Code:'User-defined variable to pass to the Shell_NotiyIcon function
Private Type NOTIFYICONDATA
    cbSize As Long
    hWnd As Long
    uId As Long
    uFlags As Long
    uCallBackMessage As Long
    hIcon As Long
    szTip As String * 64
End Type

'Constants for the Shell_NotifyIcon function
Private Const NIM_ADD = &H0
Private Const NIM_MODIFY = &H1
Private Const NIM_DELETE = &H2

Private Const WM_MOUSEMOVE = &H200

Private Const NIF_MESSAGE = &H1
Private Const NIF_ICON = &H2
Private Const NIF_TIP = &H4

Private Const WM_LBUTTONDBLCLK = &H203
Private Const WM_LBUTTONDOWN = &H201
Private Const WM_LBUTTONUP = &H202
Private Const WM_RBUTTONDBLCLK = &H206
Private Const WM_RBUTTONDOWN = &H204
Private Const WM_RBUTTONUP = &H205

'Declare the API function call
Private Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" _
    (ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean
     
Dim nid As NOTIFYICONDATA



this code is also in the same module but not repeated in the form
Code:
Public Sub AddIcon(ByVal ToolTip As String)

    On Error GoTo ErrorHandler
     
    'Add icon to system tray
    With nid
        .cbSize = Len(nid)
        .hWnd = frmMain.hWnd
        .uId = vbNull
        .uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
        .uCallBackMessage = WM_MOUSEMOVE
        .hIcon = frmMain.Icon
        .szTip = ToolTip & vbNullChar
    End With
    Call Shell_NotifyIcon(NIM_ADD, nid)
     
Exit Sub
ErrorHandler: 'Display error message
    Screen.MousePointer = vbDefault
    MsgBox Err.Description, vbInformation, App.ProductName & " - " & frmMain.Caption

End Sub

in the actual systray form


Code:Private Sub mnuFileArray_Click(Index As Integer)

    Select Case Index
        Case 0 'Option 1
            RaiseEvent frmMain.Command1_Click
                    
        Case 1 'Option 2
            RaiseEvent frmMain.cmd_StopAll_Click
                    
        Case 4 'Option 1
            Unload Me
            End
     
    End Select
     
End Sub

to add the icon i use this (in frmmain)

Code:Private Sub Form_Resize()
If Me.WindowState = 1 Then
    Me.Hide
    Call AddIcon("MyDesktop v1.0, Click to launch, right click for menu")
End If
End Sub

and finally to remove the icon i use this, although it doesnt seem to be working

Code:Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
'Remove icon from system tray
    Call Shell_NotifyIcon(NIM_DELETE, nid)

End Sub

I understand if you guys cant help it is a fair bit of code to post but its really annoying me that the icon will not go away when the program is exited, unless it is moused over

Thanks for any help



Edited by - thecubical on 2/19/2004 11:34:20 PM

System Tray Icon
Hey,

Just wondering who do you change the appearance of the icon that appears for the system tray?
What is needed to change it from the 'default' icon to one using a jpeg?
Any help would be great, thanks heaps.

How To Put A Icon In The System Tray?
How do I put an icon in the System Tray? I've seen it done with API and I like that, but sometimes API is Operating System Dependent(works on win2000 but not on win98). Can I see an example of the API code using a picture box I think?

Thankz, Drew
Moses420ca@yahoo.ca?SUBJECT=I Love Your Stuff

Only One Icon In System Tray
Whenever i load my application i add an icon to the system tray. But then if i lauch the application again, it adds another icon to the system tray..how do i prevent this..

so i guess i would need to figur eout if there is already an instance of my application running or not..if yes then do something...right?

can someone provide me the hints to this one...

Thakns,

System Tray Icon Doesn't Appear
Hi,

I've got an application where i putted some lines of code to display an icon in the systray when the program runs. If I do it normally in Windows XP, it works great. The problem is that when Windows starts up, so does my program, the icon doesn't appear - even with the internal call.
Does someone knows how to fix this? Is there a way for me to find out if the icon is loaded or not ( in this last case I would run the call again )?

Regards,

Rigel_Kent

System Tray Icon Problem
I have created a test project of the one I'm currently working on and have included the entire test project. Here's the problem. The form has 12 label controls on it. When you click on the icon in the system tray nothing happens. I have used the sys tray before and have not seen this problem. The code that sets up the tray icon is from MSDN. If you remove the 2 labels with the caption of (Ordered and Completed) the tray icon works fine but if you put them back in the project the tray icon no longer works. Any ideas as to what's happening here? The blank labels are part of an array in the real project and the tray icon works fine as long as the 2 mentioned labels above are removed.

How To Remove My Icon In The System Tray?
Is there any other way of removing system tray icons besides Shell_NotifyIcon DELETE?

System Tray Icon Issues
I have made this system try for my shell, and at 1st glance it seemed to have worked, but.. It doesnt show everything that is in the system tray of windows. ie. Pest patrol, AOL, ect.. Winamp shows fine along with windows messenger and my firewall.

I would post the code here but there is not enough room


I have scoured it for hoursd and I dont seem to be able to find alot wrong

I have zipped it into a self extracting winrar file at http://12.215.181.211/SystemTray.exe

or the .vdp .bas .frm and .cls can be viewed at http://12.215.181.211/system-tray/

if anyone has time please take a look at the file or the code above and tell me if you have any ideas.

Dbl Click On A System Tray Icon
how do I go about double clicking on a particular icon in the system tray?

Thanks,
John

System Tray Icon Problem
OK, here it is,

Download the attachment and run the program. Minimize the form. A sytem tray icon should appear. Right click (or Left Click) on the new icon. Nothing happens. Rght or Left click again. The menu should now appear. My questions is, what is causing it to make me click twice to show the popup menu.

Any ideas are welcome, I've spent hours trying to figure this out.

Making A System Tray Icon
I saw it done once, about a year and a half ago, but I kinda forgot how to do it. Basically, I want to make a program that will not be seen in the taskbar (like what you see below, a little box that says Extreme VB - Make a...), but to be placed down with the system tray (that holds the time/date, etc.).
So, any direction that I can be pointed out to would be apprishiated. I need to place the icon in the tray as well as remove the application from the taskbar.

Thanks,
Sort

How Do I Put My Program Icon In System Tray?
I know this has been brought up a number of times before, but I'm still lost. People have mentioned the Windows API and a .ocx but I'm still lost. I don't think I have that .ocx. So how would I go about making my program have its icon in the system tray?

Copyright © 2005-08 www.BigResource.com, All rights reserved