Jump to content
Sign in to follow this  

Hide Start Button

Recommended Posts

Since there is no help section for this, ill ask here. Does any1 know how to disable the start button, as in no mouse click and no keyboard button, and then re-enable it. The following coe disables it, but not re-enables it. because i teh noob with VB some1 edit it for me plz.

 

Dim hWnd1 As Long

 

'General declarations

Private Declare Function FindWindow Lib "user32" _

Alias "FindWindowA" _

(ByVal lpClassName As String, _

ByVal lpWindowName As String) As Long

 

 

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 ShowWindow Lib _

"user32" (ByVal hwnd As Long, _

ByVal nCmdShow As Long) As Long

Const SW_HIDE = &H0

Const SW_SHOW = &H5

 

 

Private Declare Function SendMessage Lib "user32" Alias _

"SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, _

ByVal wParam As Long, lParam As Any) As Long

 

Const WM_CLOSE = &H10

 

'command1 click event

Private Sub Command1_Click()

SendMessage FindWindowEx(FindWindow("Shell_TrayWnd", ""), 0&, "Button", vbNullString), WM_CLOSE, 0, 0

End Sub

Share this post


Link to post
Share on other sites

I am creating a password program that will only exit on a password, I have already disabled alt+f4, alt+tab ctrl+alt+del (pain in the ass). the only thing left is start button on XP, win 98 2000 etc is done. I would prefer if some1 would eedit that code since it will be in one app.

Share this post


Link to post
Share on other sites
I am creating a password program that will only exit on a password, I have already disabled alt+f4, alt+tab ctrl+alt+del (pain in the ass). the only thing left is start button on XP, win 98 2000 etc is done. I would prefer if some1 would eedit that code since it will be in one app.

 

 

 

To do that, you would have to assign the key to a certian function...

I forgot how to do it... But, there is also a registry key that disables the windows key... That would be the easiest way...

 

And to rid the computer of the start button, run the program in fullscreen.

Share this post


Link to post
Share on other sites

no, i can already disable it, I want some1 to edit the code above to enable it because n order to re-enable u have to restart ur machine. and it is running in FS, but it will pop-up if the button is pressed.

Share this post


Link to post
Share on other sites

yeah, sorry i can't help. i wouldn't say i'm good with vb, but i know enough to do what i want it to do. i can't think of any one off the top of my head who knows alot about vb except bren.

Share this post


Link to post
Share on other sites

can some1 PLEASE help me out? I really really really really really really really really really really really really need this.

Share this post


Link to post
Share on other sites

:D

 

I wrote you something real quick, I only tested it in Windows XP.

 

Copy this code into a module.

 

'Written by: HookE

Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Public 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

Public Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long

Public Function HideStart(Argue As Boolean)

  Dim Handle As Long, Handle2 As Long

  Handle = FindWindow("Shell_TrayWnd", vbNullString): Handle2 = FindWindowEx(Handle, 0, "Button", vbNullString)

  If Argue = True Then

     ShowWindow Handle2, 0

  Else

     ShowWindow Handle2, 1

  End If

End Function

'Example Useage

Sub Main()

  HideStart False

End Sub

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×