Visual Basic Development Bookmark and Share   
 Home > Visual Basic Language > block ctrl key
 

block ctrl key

hi im doing a login i have finish it but you can close it by using alt+f4 so i need to block the alt key
im using vb 2008 plesase help me
EricBorgsten  Thursday, November 26, 2009 1:15 PM
Protected Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keyData As Keys) As Boolean
If keyData = (Keys.Alt Or Keys.F4) Then
Return True
Else
Return MyBase.ProcessCmdKey(msg, keyData)
End If
End Function

You can also use API.

_____________________

April

http://www.comm100.com/livechat/

april_123456  Friday, November 27, 2009 10:16 AM
hi im doing a login i have finish it but you can close it by using alt+f4 so i need to block the alt key
im using vb 2008 plesase help me

have a look here: http://www.codeguru.com/forum/showthread.php?t=454892
Don't judge me, just Upgrade me. Thanks!
Malange  Friday, November 27, 2009 6:54 PM
Protected Overrides Function ProcessCmdKey(ByRef msg As Message, ByVal keyData As Keys) As Boolean
If keyData = (Keys.Alt Or Keys.F4) Then
Return True
Else
Return MyBase.ProcessCmdKey(msg, keyData)
End If
End Function

You can also use API.

_____________________

April

http://www.comm100.com/livechat/

april_123456  Friday, November 27, 2009 10:16 AM
hi im doing a login i have finish it but you can close it by using alt+f4 so i need to block the alt key
im using vb 2008 plesase help me

have a look here: http://www.codeguru.com/forum/showthread.php?t=454892
Don't judge me, just Upgrade me. Thanks!
Malange  Friday, November 27, 2009 6:54 PM

You can use google to search for other answers

Custom Search

More Threads

• Saving to cells in excel.
• IsDBNull problem
• Using Picture Box properties as variables
• Removing a specific child node by user selection from an XML file
• Eliminate redundant elements in a string array
• validation question
• VB 2008 type for serializing to xsd:enumeration in WCF
• Process.Start not returning process info
• Make .CS & .VB files one line per statement
• Problem With ClickOnce Deployment