Jump to content

Start button


robj
 Share

Recommended Posts

I'm writing a full screen gui, and I want to block the user from pressing the 'start' button to pop up the start menu.

I read in the forum that I can simulate the use of the start button using ^{Esc} but I can't get this to work as a hot key. When the user presses the start button I want to start a function that just returns to the code as if they have pressed nothing (I am using OnEvent mode, and can do this for escape etc, just the start button doesn't work).

Can anyone tell me the correct button combination to do this? Or it is not possible to block the start menu like this?

Thanks

Link to comment
Share on other sites

hello,

I have thought a lot about your problem :)

I have perhaps a solution (but it seems to me, it's just to wait for a better way)

I hope it will help you

Bye

#include <GUIConstants.au3>

$gui=GUICreate("My_GUI"); it's a ghost window which is created to "kill" the focus from the start button. You can use a real GUI instead of this one.

while 1
sleep(100)
;part of code for the start button pressed with the mouse
$txt=WinGetText(""); get the text of active window
    if StringInStr($txt,@HOUR&":"&@MIN&@LF)<>0 then coucou(); the window which contains the start button contains the time as "text". So if you press the start button, this test is true. Of course coucou() will be replaced by your function
    
;part of code for the start button pressed with keyboard    
if (_IsPressed("5b") or _IsPressed("5c")) Then coucou()
WEnd



func coucou()
     send("^{ESC}"); cancel the effect of start button  (sorry I haven't found a better way :-(   ); 
     sleep(50); just a little pause
    MsgBox(0,"test","Hello") 
    GUISwitch($GUI); I use my gui to break the focus of the start button. If it's not done, then the function is called until you click somewhere else
    WinActivate("My_GUI")
    
    
EndFunc



Func _IsPressed($hexKey); thanks to the person who has written this function;-)
  Local $aR, $bO
  $hexKey = '0x' & $hexKey
  $aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey)
  If Not @error And BitAND($aR[0], 0x8000) = 0x8000 Then
     $bO = 1
  Else
     $bO = 0
  EndIf
  Return $bO
EndFunc
Link to comment
Share on other sites

I'd a search on yahoo.com

and i found this :

Disable Menu Bars and the Start Button (Windows 95/98/Me/2000/XP) Popular

This tweak can be used to disable the menu bar in standard Windows applications and the Start Button.

Open your registry and find the key below.

Rename the key by placing a dash "-" in front of the GUID (i.e. {-5b4dae26-b807-11d0-9815-00c04fd91972}).

Restart Windows for the change to take effect.

Note: This tweak may cause a problem with the taskbar appearance when Internet Explorer 5.0 or greater is installed. If you experience a problem please reverse the tweak to restore the original setting.

Registry Settings

System Key: [HKEY_CLASSES_ROOT\CLSID\{5b4dae26-b807-11d0-9815-00c04fd91972}]

here : http://www.winguides.com/registry/category.php?42

also i found this:

http://www.novell.com/coolsolutions/zenwor...t_login_zw.html

i'd try the reg tip on a win98, and it worked the start button was ther but i dident work. not when you clicked on it nor with ctrl+esc.

I know that it's not autoIt codes but still i might help you with your problem.

else ther is alot of other tropic in the yahoo search.

Link to comment
Share on other sites

Try GPEDIT.MSC

->User Configuration->Administrative Templates->Start Menu and Taskbar

Prevent access to all relevant menu entries.

If you want to block the startmenu temporarily, use my little helper and

ControlDisable ( "", "Start", 304)
ControlHide ( "", "Start", 304)

The program blocks a lot of special key combinations at runtime.

i.e ctrl+break, ctrl+esc, alt+tab, alt+esc and the three special windows keys.

Run it, do your work and terminate it if you want.

If you install it as a service with srvany, the user can't use the restricted buttons.

This is only a helper application and checks no environment conditions.

For testing: run it, test it and then kill the process "keyblock.exe".

keyblock.zip

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...