How To Minimize All Windows - Tutorial
Use this board to post your code snippets - tips and tricks
Livengood wrote:No no I know that but I was asking which it was for :Pagust1337 wrote:Thats for the windows OS, what code are you looking for?Livengood wrote:Hey everyoneNice, but is it the open OS windows or open program windows that the person just made?
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 allThis code i the private declare which is used to minimize all the windows to the trayPrivate 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
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 allCall keybd_event(VK_LWIN, 0, 0, 0) Call keybd_event(77, 0, 0, 0) Call keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0)
If so then its just easier to do:
Go to Form1_MoveCode: Select allIf Me.WindowState = FormWindowState.Minimized Then form2.windowsstate = FormWindowState.Minimized Else 'the maximized code's go here :P
this :
form2.windowsstate = FormWindowState.Maximized
agust1337 wrote:o haha, this is use for the the main desktop of your computerLivengood wrote:No no I know that but I was asking which it was for :Pagust1337 wrote:Thats for the windows OS, what code are you looking for?
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_MoveCode: Select allIf Me.WindowState = FormWindowState.Minimized Then form2.windowsstate = FormWindowState.Minimized Else 'the maximized code's go here :P
this :
form2.windowsstate = FormWindowState.Maximized
hmm may come in useful one day for my apps!
~John
~John

Copyright Information
Copyright © Codenstuff.com 2020 - 2023