473,769 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3139
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.v isible = 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.v isible = 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,
GetWindowThread ProcessId).
2. Remember which windows of this process are visible and hide them all
(IsWindowVisibl e, 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

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

Similar topics

1
3713
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 could respond to that keypress (much in the way my pgp app encrypts on ctrl-alt-e) even though its minimized and your in a different app? I've got an app thats a system tray and while its easy to access the data I'm just trying to add an extra...
0
1451
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 source. The state of this other application is clearly visible through its Notify icon in the system tray which changes with the state change. I have following two questions with two different approaches to this monitoring: 1. Is it possible to...
3
2060
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 this application does not appear in this list when a FORM is visible ?
4
3958
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 our phone system. When a phone call comes in, users can click a button on the ActiveX control and begin recording. My task is to fire off this recording, behind the scenes, without user interaction, using the existing instance of the ActiveX...
1
3287
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 Dim mouse As Cursor Dim Myprojectdet As New frmProjectDetails If SetupContextMenu(cmnuSysTray, "SystemTray", Myprojectdet.ImgJobDetails) Then cmnuSysTray.TrackPopup(New
11
1985
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 service to have communication be able to distinguish that data needs to be sent to app A instead of app B. I was going to try to use a desktop handle to distinguish between the two, but I can't create the service as an interactive service (nor...
4
6131
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 sometimes a balloontip, but then focus is taken away from the application the user is using when this happens. How can I return focus to the original application? For example, let's say the user is using Notepad and then presses Ctrl-F9. This causes...
1
5639
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 can I refresh the system tray to remove the notify icon when the app closes?
3
1729
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, however i'm having trouble with the system tray icon, i can show/hide the main window using the icon with a context menu etc. However what i would like to do it to make the icon go to the system tray when i press the red cross in the top right corner...
0
9579
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
9987
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
9857
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8867
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...
1
7404
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5444
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3558
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2812
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.