I want to provide a functionality to my program : If I click on one button (it's name is HIDE), I'll unregister the process and hide the program, unloading also it from taskbar and/or system tray. The user can show it again pressing the keys SHIFT and F12. How can I do it? I just could make with the F12 alone. Thanks ssaguiar
Posted on 2001-01-27 20:40:00 by ssaguiar
Register hot key with RegisterHotKey
Posted on 2001-01-27 20:47:00 by Iczelion
to do the hide program bit, set your window show state with show window invoke ShowWindow ,hWnd,SW_HIDE then you can hide the app in the Ctl+Alt+Del list by calling RegisterServiceProcess, this is however not a standed API as such though, it must be accessed indirectly .data Kernel BYTE "Kernel32.dll",0 RegServiceProc BYTE "RegisterServiceProcess",0 ;Name of API .code invoke GetModuleHandle ,ADDR Kernel ;Get Kernel32 base address invoke GetProcAddress ,eax,ADDR RegServiceProc ;Get address of RegServiceProcess push TRUE ;TRUE for register as service process push NULL ;NULL for this process (i think this is a handle to a process, but im not sure) call dword ptr eax ;call the proc To unhide, just push FALSE, instead of push TRUE
Posted on 2001-01-27 22:43:00 by X