Important alert: (current site time 7/22/2014 4:22:29 PM EDT)
 

VB icon

Hide - Show the "Start" Button windows Vista and 7

Email
Submitted on: 4/25/2012 4:14:33 PM
By: Diomidis 
Level: Advanced
User Rating: By 2 Users
Compatibility: VB 6.0
Views: 5515
 
     Knowledge belongs to all. Wherever you look on the internet you can not find how to do chide the "Start Button" and "Shell tray" on windows Vista and 7 do not find a solution other than "startkiller" The following code solves the problem.
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
				
'**************************************
' Name: Hide - Show the "Start" Button windows Vista and 7
' Description:Knowledge belongs to all.
Wherever you look on the internet you can not find how to do chide
the "Start Button" and "Shell tray" on windows Vista and 7 do not find a solution other than "startkiller"
The following code solves the problem.
' By: Diomidis
'
'This code is copyrighted and has' limited warranties.Please see http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=74343&lngWId=1'for details.'**************************************

Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function ShowWindow Lib "user32.dll" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long
Public Function ShowTaskbar(ByVal IsLock As Boolean)
If IsLock = False Then
ShowWindow FindWindow("shell_traywnd", vbNullString), 1
 'only Vista-7
ShowWindow FindWindowEx(FindWindow("Desktop", ""), 0, "Button", vbNullString), 1
 'only XP
 'ShowWindow FindWindowEx(FindWindow("shell_traywnd", ""), 0, "Button", vbNullString), 1
 Else
 ShowWindow FindWindow("shell_traywnd", vbNullString), 0
 'only Vista-7
 ShowWindow FindWindowEx(FindWindow("Desktop", ""), 0, "Button", vbNullString), 0
 'only XP
 'ShowWindow FindWindowEx(FindWindow("shell_traywnd", ""), 0, "Button", vbNullString), 0
End If
End Function


Other 3 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

1/23/2014 8:17:46 AMAlain GUERIN

Excelent Diomidis !
Works fine On Win7 :)

Add to hide desktop :
ShowWindow FindWindowEx(0&, 0&, "Progman", vbNullString), 0

And to show back :
ShowWindow FindWindowEx(0&, 0&, "Progman", vbNullString), 5

(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.