Hi !I wonder How to Disable Alt-F4 in HTA ?i read this article : http://ehow.com/how_10031549_disable-al ... l-hta.html and i tried it but didn't work for me , so i'm asking you how can this be done properly !Thank you !
hackoo2012-08-16 06:52:37
How to Disable Alt-F4 in HTA ?
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
How to Disable Alt-F4 in HTA ?
Hi !I wonder How to Disable Alt-F4 in HTA ?i read this article : http://ehow.com/how_10031549_disable-al ... l-hta.html and i tried it but didn't work for me , so i'm asking you how can this be done properly !Thank you !
hackoo2012-08-16 06:52:37
hackoo2012-08-16 06:52:37
How to Disable Alt-F4 in HTA ?
Hi Just give a try
Code: Select all
<html>
<head>
<TITLE>LOGIN</TITLE>
<HTA:APPLICATION
APPLICATIONNAME="LOGIN"
VERSION="1.0.0.0"
BORDER="none"
INNERBORDER="no"
CAPTION="no"
SYSMENU="no"
MAXIMIZEBUTTON="no"
MINIMIZEBUTTON="no"
ICON="NO"
SCROLL="no"
SCROLLFLAT="yes"
SINGLEINSTANCE="yes"
WINDOWSTATE="maximize"
SHOWINTASKBAR="no"
CONTEXTMENU="no"
SELECTION="no"/>
</head>
<SCRIPT Language="VBScript">
Sub RunScript
Password=InputBox("Type your Password :","Type your Password")
IF Password ="" THEN
MsgBox "Password is empty !",16,"Password is empty !"
End If
If Password = "123" Then
window.close
End if
End Sub
Sub Pointer
document.body.style.cursor = "hand"
End Sub
Sub DefaultCursor
document.body.style.cursor = "default"
End Sub
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
function document.onkeydown() {
var alt=window.event.altKey;
if (event.keyCode==116 || event.keyCode==27 || alt && event.keyCode==115) {
event.keyCode=0;
event.cancelBubble=true;
return false;
}
}
</SCRIPT>
<body text=white bgcolor=#1234568>
<center><span id="ClickableSpan" onClick="RunScript" onmouseover="Pointer"
onmouseout="DefaultCursor">
Click here to UnLock The Screen !</span>
</body>
</html>