This code example will minimize all your open windows simulating the "Show Desktop" quick launch button shortcut next to the Start windows menu button.
VB Code:
Option Explicit 'Copyright © 2005 by RobDog888 (VB/Office Guru™). All Rights reserved. ' 'Distribution: You can freely use this code in your own ' applications provided that this copyright ' is left unchanged, but you may not reproduce ' or publish this code on any web site, online ' service, or distribute as source on any ' media without express permission. ' 'Add a command button to your form and copy/paste this code Private Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, _ ByVal dwExtraInfo As Long) Const VK_STARTKEY = &H5B Const VK_M = 77 Const KEYEVENTF_KEYUP = &H2 Private Sub Command1_Click() 'WinKey down keybd_event VK_STARTKEY, 0, 0, 0 'M key down keybd_event VK_M, 0, 0, 0 'M key up keybd_event VK_M, 0, KEYEVENTF_KEYUP, 0 'WinKey up keybd_event VK_STARTKEY, 0, KEYEVENTF_KEYUP, 0 End Sub





Reply With Quote