Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
9
Erster Beitrag:
vor 8 Jahren, 7 Monaten
Letzter Beitrag:
vor 8 Jahren, 2 Monaten
Beteiligte Autoren:
Arie, emirhan, Mitchell, christoph

minimize program on taskbar

Startbeitrag von emirhan am 24.02.2009 08:27

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

Antworten:

Hi emirhan,

use sysiconadd and sysicondelete.

christoph

von christoph - am 24.02.2009 08:35
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

von emirhan - am 24.02.2009 09:01
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

von Arie - am 24.02.2009 09:07
Hi Arie, I used your code with some changes. Thanks.

Best regards
Emirhan.

von emirhan - am 24.02.2009 09:25
where im going to put this on my main form ?

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




von Mitchell - am 30.06.2009 12:42
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

von Arie - am 30.06.2009 13:12
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.


von Mitchell - am 30.06.2009 13:51
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

von Arie - am 30.06.2009 14:36
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.