-
Minimize to SysTray
I notice there are(and have been) quite a few queries on this topic.
I think this would be a candidate for the CodeBank ?
I think something as simple(to use) as -
Icon loads into systray on Form_Load.
When user clicks the Icon it shows the Form, if not showing.
It hides the Form if it is showing.
It has no right click popup menu.
It does not require double click
The Form never shows in the Taskbar.
Just click to show Form, and click to hide Form.
No menus (although a hidden popup menu in design mode, may be required to get it working ?)
Is anyone aware of an example like that ?
-
Re: Minimize to SysTray
How about any number of these? ;)
-
Re: Minimize to SysTray
OOPs I'll check them out.
In my defence, I did a search of this forum on 'Minimize to systray' and got two pages of results. But none of those were in the CodeBank.
-
Re: Minimize to SysTray
Dont worry about it ;)
Also try a search in Classic VB forum for "SysTray" for other examples. :)
-
Re: Minimize to SysTray
Thanks,
I settled on one of those that you linked to.
It was a nice small one with only a single Form.
I moved all of the SysTray stuff into a bas file.
I have added that bas file to this project.
Save a Screenshot
I have provided the link back to the codebank original in 'my' (cough!) project
The changes required to that project, to utilise the Bas file only took a few minutes.
This approach should also answer some of the current questions regarding systray (eg no menu required etc)
-
1 Attachment(s)
Re: Minimize to SysTray
For those that don't wish to download 'my' (cough!) project, I am attaching the original from the CodeBank.
Actually it is a modified version of it, where I have moved much of the code, out of the Form and placed it into a bas file.
All you have to do is copy the Bas file into your existing projects, and do some minor changes to your Form.
When your project starts, it loads an Icon into the systray.
You app does not need to be in the Taskbar (ever).
Click systray icon to hide Form.
Click systray icon to show Form.
If you have never used an app that can hide/show that easily, trust me you, and your users will love that convenience.
PS The link to the untouched original, is in the Bas file.
-
Re: Minimize to SysTray
The click to hide and click to show, was ok, except you had to hide some Apps to see our Form.
I have enhanced -
Save a Screenshot
to hopefully fix that inconvenience.
The same solution can be blended into the project that was attached above.
( systray_but_code_now_in_bas.zip )
Post here, if you want me to do it.
-
Re: Minimize to SysTray
Sure. I thought that you did already. I also commented that you should include the jpeg.dll in the zip file. Lots of people will appreciate that.
You could include our user names, also.