Page 2 of 2

Re: How To Minimize All Windows - Tutorial

Posted: Tue May 04, 2010 10:56 pm
by mikethedj4
hungryhounduk wrote:
yes Good One Livengood :)
x2

Re: How To Minimize All Windows - Tutorial

Posted: Sat May 08, 2010 5:25 pm
by Agust1337
Livengood wrote:
agust1337 wrote:
Livengood wrote:
Hey everyone :)
i am here to show you guys how to Minimize all the windows with Vb.Net
first to start it off

Put this code under the - Public Class [Project Name]
Code: Select all
      Private Declare Sub keybd_event Lib "user32" ( _
         ByVal bVk As Byte, _
         ByVal bScan As Byte, _
         ByVal dwFlags As Long, _
         ByVal dwExtraInfo As Long)

      Const KEYEVENTF_KEYUP = &H2
      Const VK_LWIN = &H5B
This code i the private declare which is used to minimize all the windows to the tray

now lets say you want to make a button minimize all windows, *adding this code + the private declare all windows will become minimized :)
Code: Select all
Call keybd_event(VK_LWIN, 0, 0, 0)
         Call keybd_event(77, 0, 0, 0)
         Call keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0)
Nice, but is it the open OS windows or open program windows that the person just made?

If so then its just easier to do:
Go to Form1_Move
Code: Select all
 If Me.WindowState = FormWindowState.Minimized Then
              form2.windowsstate = FormWindowState.Minimized
          Else
             'the maximized code's go here :P
Thats for the windows OS, what code are you looking for?
this :
form2.windowsstate = FormWindowState.Maximized
No no I know that but I was asking which it was for :P

Re: How To Minimize All Windows - Tutorial

Posted: Sun May 09, 2010 6:35 pm
by Livengood
agust1337 wrote:
Livengood wrote:
agust1337 wrote:

Nice, but is it the open OS windows or open program windows that the person just made?

If so then its just easier to do:
Go to Form1_Move
Code: Select all
 If Me.WindowState = FormWindowState.Minimized Then
              form2.windowsstate = FormWindowState.Minimized
          Else
             'the maximized code's go here :P
Thats for the windows OS, what code are you looking for?
this :
form2.windowsstate = FormWindowState.Maximized
No no I know that but I was asking which it was for :P
o haha, this is use for the the main desktop of your computer

Re: How To Minimize All Windows - Tutorial

Posted: Sun Jun 20, 2010 9:38 pm
by rocky4126
hmm may come in useful one day for my apps!

~John

Re: How To Minimize All Windows - Tutorial

Posted: Mon May 23, 2011 5:52 pm
by Martin
i have seen this on some other forum to.

Re: How To Minimize All Windows - Tutorial

Posted: Mon May 23, 2011 5:55 pm
by Axel
Thats a bump.