Welcome! Log In Create A New Profile

Advanced

minimize program on taskbar

Posted by emirhan 
emirhan
minimize program on taskbar
February 24, 2009 09:27AM
Hi all,

How can I minimize my program on taskbar. I need to add a button to the main window and when I click the button, the program must be minimized to the taskbar(right corner of the monitor, near the windows clock)
thanks
christoph
Re: minimize program on taskbar
February 24, 2009 09:35AM
Hi emirhan,

use sysiconadd and sysicondelete.

christoph
emirhan
Re: minimize program on taskbar
February 24, 2009 10:01AM
SysIconAdd("D:\My Projects\AKEAD-BCK\01745-32-5.ico","","test")

I used that code behind of a button, when I click the button I can see the icon on task bar but program does not minimize. How can I minimize the program on the icon and when I click the icon the program must maximize
Arie
Re: minimize program on taskbar
February 24, 2009 10:07AM
Emirhan,
I use this:

WinStatus(MyWindow..Name,Invisible)
SysIconAdd("your.ico",YourPopupMenu,"YourHint","SysIconProc")

Together with:

PROCEDURE SysIconProc(nMessage is int)
// Show main window
IF nMessage = WM_LBUTTONDBLCLK THEN
WinStatus(Window1,Active)
END
//Left button down: WM_LBUTTONDOWN = 513
// Show popup on left mouse click as well
IF nMessage = WM_LBUTTONDOWN THEN
OpenPopupMenu(YourPopupMenu)
END
END

Arie
emirhan
Re: minimize program on taskbar
February 24, 2009 10:25AM
Hi Arie, I used your code with some changes. Thanks.

Best regards
Emirhan.
Mitchell
Re: minimize program on taskbar
June 30, 2009 02:42PM
where im going to put this on my main form ?

" WinStatus(MyWindow..Name,Invisible)
SysIconAdd("your.ico",YourPopupMenu,"YourHint","SysIconProc")
"


Arie
Re: minimize program on taskbar
June 30, 2009 03:12PM
Mitchell,
I placed it in de global declaration section of the window.
But I think you can put it everywhere you want. Try a button first, to see what happens.
Also: when generating the executable, don't forget to include the icon-files.(OR distribute these files with your executable)

Arie
Mitchell
Re: minimize program on taskbar
June 30, 2009 03:51PM
I still didn't get it, how to run it when i minimize the form? the main form is MDI form, if the user minimize it, I want to iconize the form.
Arie
Re: minimize program on taskbar
June 30, 2009 04:36PM
Ah, now I see. I didn't read your post that well.

You can use the Resizing-event of the window, together with the WinSize() function,
to trap the minimize-action of the user.

Arie
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: