How to Disable Alt-F4 in HTA ?

Batch, ASP, JScript, Kixtart, etc.
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.
This topic is 11 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
hackoo
Posts: 103
Last visit: Tue Apr 26, 2016 9:02 am

How to Disable Alt-F4 in HTA ?

Post 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
User avatar
hackoo
Posts: 103
Last visit: Tue Apr 26, 2016 9:02 am

How to Disable Alt-F4 in HTA ?

Post 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
User avatar
hackoo
Posts: 103
Last visit: Tue Apr 26, 2016 9:02 am

How to Disable Alt-F4 in HTA ?

Post 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>
This topic is 11 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked