forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


How can I minimize all windows ?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
laurent_H
Contributor
Contributor


Joined: 30 Jun 2001
Posts: 60

PostPosted: Mon Aug 04, 2003 12:29 pm    Post subject: How can I minimize all windows ? Reply with quote

hi,

someone have an idea to minimize all window ?

Regards Laurent
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Mon Aug 04, 2003 12:51 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Mon Aug 04, 2003 12:58 pm    Post subject: Reply with quote

Info on checking window states here:

http://forum.vdsworld.com/viewtopic.php?t=1803

VDS5 though...

Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Aug 04, 2003 2:03 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
laurent_H
Contributor
Contributor


Joined: 30 Jun 2001
Posts: 60

PostPosted: Mon Aug 04, 2003 2:34 pm    Post subject: Reply with quote

Sorry it's a VDS 5 I have only VDS 4...

Any idea ?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Mon Aug 04, 2003 2:36 pm    Post subject: Reply with quote

Thanks FreezingFire, that's really nice, I didn't know that. Surprised Very Happy

So Laurent, for FreezingFire's idea you won't need VDS 5.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
laurent_H
Contributor
Contributor


Joined: 30 Jun 2001
Posts: 60

PostPosted: Mon Aug 04, 2003 2:37 pm    Post subject: Reply with quote

ok in this case how can I get all windows name list ?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Mon Aug 04, 2003 3:10 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Tue Aug 05, 2003 6:08 am    Post subject: Reply with quote

I don't know why you want to minimize all windows Confused
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 Sad
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
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Tue Aug 05, 2003 6:18 pm    Post subject: Reply with quote

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
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
laurent_H
Contributor
Contributor


Joined: 30 Jun 2001
Posts: 60

PostPosted: Fri Aug 15, 2003 10:48 am    Post subject: Reply with quote

thanks a lot !
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group