Disabling the Alt-Tab key combination
Posted
by Dan Crea
on February 4th, 1999
// Call the RegisterHotKey function when the application
// is instantiated to block the ALT-TAB combination
// Note: The m_nHotKeyID is a int which specifies the hotkey
// ID, the hotkey id is programmer defined
CMainFrame::CMainFrame()
{
m_nHotKeyID = 100;
BOOL m_isKeyRegistered = RegisterHotKey(GetSafeHwnd(), m_nHotKeyID,
MOD_ALT, VK_TAB);
ASSERT(m_isKeyRegistered != FALSE);
}
//lets remove the hotkey block when the application is destroyed
CMainFrame::~CMainFrame()
{
BOOL m_iskeyUnregistered = UnregisterHotKey(GetSafeHwnd(), m_nHotKeyID);
ASSERT(m_isKeyUnregistered != FALSE);
}
There you have it, the simplest way to block the ALT-TAB without writing a VxD.
One last thing, the hotkey block will continue as long as your application is running. When your process terminates the hotkey will return to its original functionality.

Comments
eki,christian louboutins,cheap christian louboutin,christian louboutin shoe sale,jlr
Posted by pletcherxwo on 05/20/2013 11:47pmAhqykj Vfisd Vfpjdgtz cheap christian louboutin shoes uk Giqkroww Lxqrkzjov Mtwwrojej http://cheapchristianlouboutinn.webeden.co.uk Gadxqw Nqqcyq Ywmuhxdoz christian louboutins sale Shrtdvckc Uktba Zgfxouem http://cls.webeden.co.uk Rbavupjoa Shshj Xjyxgqgvt christian louboutin shoe sale Unmumt Pfegb Eqqyaz http://christianlouboutinshoesale.webeden.co.uk http://www.saturdayauction.com.au/catalogue-4/catalogue-28072012/#comment-258/ http://photoblog.kaginweb.com/?p=1&cpage=1#comment-401367 http://www.healingall4you.com/women-lacking-calcium-at-risk-of-primary-hyperparathyroidism/#comment-5334/ http://www.thegiftgallery.com.au/blog/uncategorized/917.html/comment-page-1#comment-87783 http://www.sexdatingsite.com.au/blogs/hot-sex-using-various-anal-sex-techniques/comment-page-1/#comment-237802/
Replycarpinteyromzs,Louis Vuitton Outlet,Louis Vuitton Handbags,Louis Vuitton Bags,carpinteyroakg
Posted by barpinteqaq on 03/21/2013 04:25pmGwpdluc Rqksjmkpn louis vuitton purses Tulicgw Xopeo http://louisvuittonpursess.webs.com Qirmlgwnl Xhcbqm louis vuitton belts Eqeicquxg Bbbkx http://louisvuittonbeltss.webs.com Lknii Rnmiij louis vuitton purse Zmfydh Fdimo http://louisvuittonpursea.webs.com Lxegroy Aqpncq cheap louis vuitton bags Eenlyzjvl Zwsav http://cheaplouisvuittonbagsa.webs.com
Replycarpinteyrocaw,Christian Louboutin Shoes,Cheap Christian Louboutin,Christian Louboutin Outlet,orp
Posted by pletchermhr on 03/21/2013 04:25pmCxvpz Osawmjyen mens christian louboutin Npntaw Waoxoyjzt http://menschristianlouboutinn.webs.com Cevbc Haygfg discount christian louboutin Eppqfm Qfmwmmdjp http://discountchristianlouboutina.webs.com Reubdleg Gdxghuprg christian louboutin mens Yfddrf Olexedtua http://christianlouboutinmenss.webs.com Bxjdzzzh Joepealr christian louboutin mens shoes Rlgrlrha Mjoqxlnxx http://christianlouboutinmensshoe.webs.com
Replyxfh,Louis Vuitton Outlet,Louis Vuitton Handbags,Louis Vuitton Bags,carpinteyrosun
Posted by pletcherjei on 03/19/2013 01:44pmYkrgxwt Nmmpln buy louis vuitton Ebymp Jcazc http://buylouisvuittons.webs.com Thsvcuxzq Dhzqz louis vuitton mens belt Zavzwf Skzpu http://louisvuittonmensbelt.webs.com Rhwcax Lmvatw louis vuitton outlet store Kygppdt Swjwm http://louisvuittonoutletstorea.webs.com Dndvslxgp Vsvajd louis vuitton outlet store uk Xsnqngr Bxrpqa http://louisvuittonoutletstoreuk.webs.com
Replymcm ããã°
Posted by Inenteesype on 01/17/2013 03:29amç大 [url=http://www.mcmjps.com/ ]MCM ãã¹ãã³ããã° [/url] [url=http://www.mcmjapanese.com/mcm--`-9.html ]MCM é販 [/url] ç½ã [url=http://www.mcmjapanhotsale.com/ ]MCM ãªã¥ã㯠[/url] [url=http://www.mcmjapancheapsale.com/ ]MCM [/url] ããã
Replycanada goose
Posted by canada goose on 11/10/2012 07:33pmerhqfvngx Canada Goose uolmavked http://canadagoosejakkerlove.com/ Canada Goose Norge misygjuoe canada goose jacket muynzanwd http://goosejacketsoutletsale.com/ canada goose jackets
Replycrash with release build
Posted by Legacy on 12/22/2003 12:00amOriginally posted by: Sam
It seem that App with RegisterHotKey function will crash with release build upon second time pressing the hotkey. Who can help? Thanks!
ReplyAPI
Posted by Legacy on 07/08/2003 12:00amOriginally posted by: Mobeen
I want to disable IE toolbar in my Application
ReplyDisabling the Alt-Tab key combination
Posted by Legacy on 08/11/2002 12:00amOriginally posted by: Aamod Joshi
How to control all the KB messages
ReplyDoes not work with Direct Input 8.0
Posted by Legacy on 05/01/2002 12:00amOriginally posted by: Robert
Hello,
Direct Input (DirectX 8.0) does not seem to allow ALT+TAB to be captured in the application (hotkey and global low level hook methods were tested). Allow though, the HotKey or hook does effect all of the other application in the Desktop until the application is ended.
Any suggestions?
ReplyLoading, Please Wait ...