View previous topic :: View next topic |
Author |
Message |
laurent_H Contributor


Joined: 30 Jun 2001 Posts: 60
|
Posted: Mon Aug 04, 2003 12:29 pm Post subject: How can I minimize all windows ? |
|
|
hi,
someone have an idea to minimize all window ?
Regards Laurent |
|
Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Mon Aug 04, 2003 12:51 pm Post subject: |
|
|
I would suggest using LIST WINLIST with the "I" flag to obtain a list of all window identifiers
and then using the WINDOW ICONIZE command for each window identifier.
I'm not sure if there is a way to retrieve the window state in VDS, if there is then
it may be a good idea to check if the window is actually visible before trying to
minimize it, to avoid problems with hidden tray windows and such. |
|
Back to top |
|
 |
Dr. Dread Professional Member


Joined: 03 Aug 2001 Posts: 1065 Location: Copenhagen, Denmark
|
|
Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Aug 04, 2003 2:03 pm Post subject: |
|
|
You can also check window states using the @winpos() function:
%A = @winpos(<window>, S)
(1 = normal; 2 = iconized; 3 = maximized) _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
 |
laurent_H Contributor


Joined: 30 Jun 2001 Posts: 60
|
Posted: Mon Aug 04, 2003 2:34 pm Post subject: |
|
|
Sorry it's a VDS 5 I have only VDS 4...
Any idea ? |
|
Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Mon Aug 04, 2003 2:36 pm Post subject: |
|
|
Thanks FreezingFire, that's really nice, I didn't know that.
So Laurent, for FreezingFire's idea you won't need VDS 5. |
|
Back to top |
|
 |
laurent_H Contributor


Joined: 30 Jun 2001 Posts: 60
|
Posted: Mon Aug 04, 2003 2:37 pm Post subject: |
|
|
ok in this case how can I get all windows name list ? |
|
Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Mon Aug 04, 2003 3:10 pm Post subject: |
|
|
What I meant is this code:
Code: |
list create,1
list winlist,1,I
repeat
%i = @next(1)
if @not(@equal(@winpos(%i,S),2))
window iconize,%i
end
until @equal(@index(1),@count(1))
list close,1
|
It is unadvisable to try it though unless you would like to reboot. I guess the @WINPOS(,S)
function is just not accurate enough, so you would probably need to to go with VDS 5 and
Dr. Dread's code if you would like to go with this way. |
|
Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Tue Aug 05, 2003 6:08 am Post subject: |
|
|
I don't know why you want to minimize all windows
I guess you want to show a wallpaper or something you changed from your app.
In that case if you minimize all windows user has to restore them back and also the last active window position is lost.
You may consider Show/Toggle desktop instead.
This can be done as follows :
In notepad copy this :
Code: | [Shell]
Command=2
IconFile=explorer.exe,3
[Taskbar]
Command=ToggleDesktop
|
and save as anyname.scf in the same directiory as the .dsc.
You can change the IconFile= to any icon you want.
Now in VDS add:
Code: |
SHELL open,anyname.scf
|
under a button.
Click the button - desktop is shown.
Although looks a little unprofessional it works on all window versions and any VDS versions.
I dont know how to send this explorer command directly without a scf file
If you are interested in the above one you can get it as a package here:
http://codescript.vdsworld.com/VDS5src/Explorer_Commands.zip _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Tue Aug 05, 2003 6:18 pm Post subject: |
|
|
Well here is a clean code. VDS 4 too !.
Enjoy!
Code: | REM MINIMIZE ALL
%A = @SENDMSG(#Shell_TrayWnd,$111,419,0)
REM UNDO MINIMIZE ALL
%B = @SENDMSG(#Shell_TrayWnd,$111,416,0) |
_________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
Back to top |
|
 |
laurent_H Contributor


Joined: 30 Jun 2001 Posts: 60
|
Posted: Fri Aug 15, 2003 10:48 am Post subject: |
|
|
thanks a lot ! |
|
Back to top |
|
 |
|