C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » VB.NET Syntax »

Minimizing all the forms and windows(Show Desktop)


Posted Date: 10 Oct 2008    Resource Type: Code Snippets    Category: VB.NET Syntax
Author: RekhaMember Level: Gold    
Rating: 1 out of 5Points: 5



In this snippet i've created a method called showdesktop() which will make operation like (windows+d) key operation. It'll minimize all the windows and shows the desktop.


Public Sub ShowDesktop()
keybd_event(VK_LWIN, 0, 0, 0)
keybd_event(77, 0, 0, 0)
keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0)
End Sub

Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, _
ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Const KEYEVENTF_KEYUP = &H2
Private Const VK_LWIN = &H5B

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Call ShowDesktop()
End Sub



Responses

Author: Wayne Boucon    21 Oct 2009Member Level: Bronze   Points : 0
Thank you very much for this code. It works perfectly! Best regards.


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Show desktop in vb.net  .  Minimizing all windows in vb.net  .  Desktop in vb.net  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: Creating Database Using VB.Net
Previous Resource: Check whether the user is an admin or not in vb.net
Return to Discussion Resource Index
Post New Resource
Category: VB.NET Syntax


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use