First, I have been trying how to minimize the program to the TRAY. Can any one give me some help.
Second, I have tryed to use this command:
FF_Control_ShowState(HWND_FORM1, %SW_HIDE)
when I do the program disappears and can only be found with TaskManager its located in the processes but not in the applications. Is that the intended behavior for this command?
I have the WindowsStyles, ExStyles with a check in WS_EX_APPWINDOW option.
It's too bad there isn't a option to force program to minimize to TRAY .
Oh, just looked and found an excellent example program in the example programs supply with FF3. I should have looked there first.
However, I am still curious about the behavior of this command:
FF_Control_ShowState(HWND_FORM1, %SW_HIDE)
as described above.
Ok, I have added the code from the Tray example. The program will now minimize to the TRAY, however I am having a couple of problems. First the program icon does not display on the tray. However, if I click when the icon is supposed to be the left and right clicks do what they are supposed to do.
Second problem, if I right click on where the TRAY icon should be the menu opens but when I select the "Exit Tray Example" the program does not end. the only way I can end the program is to use TaskManager and kill the process.
The only thing different is that I am using Jose Rocca's INCs because I am using his WebBrowser.
Any thoughts what might be my problem?
note added:
I removed the Webbrowser portion of the program and changed to PBwin INCs still the same problem.
Hi Marty,
I had many people ask Tray related questions over the years so I added the Tray example (based totally on PB's example that ships with the compiler).
Hard to be of much help to you in this case because without seeing the code it would just be wild stabs in the dark.
With regards to the icon not showing, have you added the icon to the Image Manager? Are you referencing the icon correctly in the NOTIFYICONDATA structure in the form's WM_CREATE?
ti.hIcon = LoadIcon(App.hInstance, "IMAGE_FACE1")
Notice the name of the image: "IMAGE_FACE1". You get this name from the Image Manager. Click on the image in the Image Manager so that you can see the image in the preview window. Look just above the image where it says "Image Preview: xxxxxx". The "xxxxxx" is the name of the image as it will appear in the resource file that FF3 generates. That is the name that you need to use in the above LoadIcon function.
If all else fails, and you feel comfortable with it, you can email me the application and I will try to track down the problem. I can't guarantee anything because I am a Tray newbie myself. :)
Thanks Paul. I just cut and pasted from the Tray example into my program. And yes I changed the icon. I will recheck. Must have missed something.
If that doesn't work. I will start with the Tray Example project and modify it into the program I am trying to build. Maybe that way I can find where I went wrong. I will work some more at it.