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

Place Any Application in the System Tray

Hello To All You Real Programmers Out There!!

There is an application called: "Tray It"

Webpage:
----------

http://www.teamcti.com/trayit/trayit.htm

Direct Download:
------------------

http://www.teamcti.com/trayit/trayit.zip

What I want to do is mimic adding any application to the system tray/keeping
that particular applications icon in the tray, like Tray It does.

I have e-mailed the webmaster to ask them if they will give me any pointers,
but they haven't replied as yet.

Do you have any ideas (real code) that will help me achieve the above? [No
Google Group links thanks Herfried :)]

Thanks in advance,

Crouchie1998

BA (HONS) MCP MCSE
Nov 21 '05 #1
10 3108
in the designer, drag a notify icon item onto your form, then assign an icon
to it in the deisgn property. then in the code window, where you want to hide
the window, do the code

""Air Code""

me.notifyicon.visible = true
me.hide()

""End Air Code""

then to show the form again, in the code window, do a notify icon double
click event and do this

""Air Code""

me.notifyicon.visible = false
me.show()

"End Air Code""

if that doesnt help, ask me and i can send u some real code on how to do it,
hope this helps
Nov 21 '05 #2
Did you read what I wrote?
LOL @ Your Reply!!

I can put my own application in the sytem tray, but if you downloaded that
application I mentioned then you will see what I am trying to do. I only
know of two people that have actually done this so far. Both of them have
coded it in C++ & although keyboard hooking is simple, I cannot work out how
the Tray It is coded

Crouchie1998
BA (HONS) MCP MCSE
Nov 21 '05 #3
Crouchie1998 wrote:
know of two people that have actually done this so far. Both of them have
coded it in C++ & although keyboard hooking is simple, I cannot work out how
the Tray It is coded


I don't know how Tray It works, but couldn't you use FindWindow to get
the window handle of the window you want, then send it a message to
minimize and then place an icon in the tray?

Nov 21 '05 #4
Hello,

AFAIK you'll have to implement a global hook for this.

"Global System Hooks in .NET":
http://www.codeproject.com/csharp/GlobalSystemHook.asp

You can catch WM_SYSCOMMAND message sent to any window and if its wParam
equals SC_MINIMIZE:

1. Loop through all windows in a system and check whether they belong to
process of window being minimized (EnumWindows,
GetWindowThreadProcessId).
2. Remember which windows of this process are visible and hide them all
(IsWindowVisible, ShowWindow).
3. Create a NotifyIcon.
4. When user requests to show the app again, make all windows that were
visible visible again and hide NotifyIcon.

Just an idea,
Roman

Nov 21 '05 #5
I have written my own hooking class in VB6 & in VB.NET & that's somewhere on
the Internet for download, but that's not it

One of the examples I have seen assa a menu item to the system menu of ALL
open windows automatically & then you use that to minimize to tray, but the
'Tray It' application does it in a completely different way by using CTRL &
Minimize to add the window to the tray & then you are able to allow to keep
an icon in the system tray, attached to that progeam.

All I want is to add two context menu items to my existing program to allow
Otllok Express to sit in the tray automatically when minimized & my Internet
account (AOL) is in the way constantly in the Taskbar & I never use it, only
for the free connection & I want that out of the way too.

But if I have the oppotunity to add other programs automatically to the
system tray, I would.

I really need some real help with this & some positive replies to my post

Crouchie1998
BA (HONS) MCP MCSE
Nov 21 '05 #6
To add context menu items to an existing program's system menu, you'll
have to play with GetSystemMenu and AppendMenu API functions. However,
to capture clicks on this items you'll still have to set up a hook to
catch WM_SYSCOMMAND etc etc.
Nov 21 '05 #7
Yeah I know that much already.

I have to hook all open windows & new windows being opened, then add the
item to the system menu (don't have to do this part though) & then hook into
everything. The part that I cannot do is to add a NotifyIcon to that
application with the programs own icon & handle a context menu/click events
when the application is minimized to system tray

Crouchie1998
BA (HONS) MCP MCSE
Nov 21 '05 #8
try XNeat @ http://www.xneat.com/ seems to do the same thing as Trayit

Nov 21 '05 #9
But there is no source code with it & that's what I want

Thanks anyway for the suggestion

Crouchie1998
BA (HONS) MCP MCSE
Nov 21 '05 #10
Just installed it on Windows 2000 Pro & it cannot find a certain DLL file &
won't run

Crouchie1998
BA (HONS) MCP MCSE
Nov 21 '05 #11

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

Similar topics

1
by: Greg Merideth | last post by:
Is there a way via c# to hook a system tray application into the windows keyboard que globally so that when the application is running and you press, say, control-alt-shift-f11 the system tray app...
0
by: Vinay Agarwal | last post by:
Hello, I am writing an application that wants to monitor another application's state (on the same computer). This other application is a commercial application and I do not have access to its...
3
by: dencdr | last post by:
Hi, I have an application VB.NET (using Form Win32) with no icon in TaskBar. When a FORM of this application is visible I see this application in the list of "Alt+Tab" choice. How do for...
4
by: Curious Coder | last post by:
I have been tasked with a project that I do not think can be accomplished. Our company has an application that runs as an unmanaged ActiveX control on user desktops. It is designed to work with...
1
by: Geraldine Hobley | last post by:
Hello, I have an icon in my system tray and I wish to call various functions from withing the tray which involve the application been maximized. The following event is on the system tray icon ...
11
by: Jay | last post by:
Hey There, I have a system tray application that is running, and it needs to communicate with a Windows Service that I wrote. My problem is that if a user switches to another desktop, I need the...
4
by: Octavius Khan | last post by:
I have an application that runs in the system tray and I use global hotkeys to perform functions. When certain hotkeys are pressed, my system tray application may display a message box and...
1
by: =?Utf-8?B?RW5naW5lZXJpaw==?= | last post by:
I have an application which uses a notification icon in the system tray. When the application is closed the notification icon remains in the system tray until I hover over it with the mouse. How...
3
by: holaboxdotcom | last post by:
Hey I'm pretty new to C# (started few hours ago) but i learn extremly fast, i have previous knowledge of php, javascript and flash. I have made my first simple application the way i want it,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.