Page 1 of 1
How to Disable Alt-F4 in HTA ?
Posted: Wed Aug 15, 2012 11:51 pm
by hackoo
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 ?
Posted: Wed Aug 15, 2012 11:51 pm
by hackoo
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 ?
Posted: Fri Aug 17, 2012 3:10 am
by hackoo
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>