Hi there,
I have this script which displays a timer using a HTA script, but I can't for the life of me work out to make it stay on top of any windows that are clicked on. I need the timer to STAY ON TOP even when a user is using applications etc.
Can anyone help please?
Here's the code:
<html>
<head>
<title>Time Left</title>
<HTA:APPLICATION
APPLICATIONNAME="Time Left"
CAPTION = "no"
BORDER="none"
SCROLL="no"
SINGLEINSTANCE="yes"
SYSMENU= "no"
SHOWINTASKBAR= "no"
WINDOWSTATE="normal"
>
</head>
<script language="VBScript">
' Declare global variable outside the Subs
Dim intMinutes
Dim intSeconds
Sub Window_onLoad
intWidth = 160
intHeight = 27
Me.ResizeTo intWidth, intHeight
Me.MoveTo ((Screen.Width / 3)*2),0
intMinutes = 4
intSeconds = 59
iTimerID = window.setInterval("CloseWindow", 1000)
End Sub
Sub CloseWindow
If intSeconds = 0 Then
If intMinutes = 0 Then
window.close
Else
intMinutes = intMinutes - 1
End If
intSeconds = 59
Else
intSeconds = intSeconds - 1
End If
span_clock.innerHTML = intMinutes & ":" & Right("00" & intSeconds, 2)
End Sub
</script>
<body TOPMARGIN="0" SCROLL="NO" STYLE="font:12 pt arial; color:white;filterrogidXImageTransform.Microsoft.Gradient
(GradientType=1, StartColorStr='#FFA500', EndColorStr='#EC5727')">
<table width='100%' height = '100%' align='centre' border='0'>
<tr>
<td align="left">
<B>Time Left</B>
</td>
<td>
<span id="span_clock">
4:59
</span>
</td>
</tr>
</table>
</body>
</html>
I have this script which displays a timer using a HTA script, but I can't for the life of me work out to make it stay on top of any windows that are clicked on. I need the timer to STAY ON TOP even when a user is using applications etc.
Can anyone help please?
Here's the code:
<html>
<head>
<title>Time Left</title>
<HTA:APPLICATION
APPLICATIONNAME="Time Left"
CAPTION = "no"
BORDER="none"
SCROLL="no"
SINGLEINSTANCE="yes"
SYSMENU= "no"
SHOWINTASKBAR= "no"
WINDOWSTATE="normal"
>
</head>
<script language="VBScript">
' Declare global variable outside the Subs
Dim intMinutes
Dim intSeconds
Sub Window_onLoad
intWidth = 160
intHeight = 27
Me.ResizeTo intWidth, intHeight
Me.MoveTo ((Screen.Width / 3)*2),0
intMinutes = 4
intSeconds = 59
iTimerID = window.setInterval("CloseWindow", 1000)
End Sub
Sub CloseWindow
If intSeconds = 0 Then
If intMinutes = 0 Then
window.close
Else
intMinutes = intMinutes - 1
End If
intSeconds = 59
Else
intSeconds = intSeconds - 1
End If
span_clock.innerHTML = intMinutes & ":" & Right("00" & intSeconds, 2)
End Sub
</script>
<body TOPMARGIN="0" SCROLL="NO" STYLE="font:12 pt arial; color:white;filterrogidXImageTransform.Microsoft.Gradient
(GradientType=1, StartColorStr='#FFA500', EndColorStr='#EC5727')">
<table width='100%' height = '100%' align='centre' border='0'>
<tr>
<td align="left">
<B>Time Left</B>
</td>
<td>
<span id="span_clock">
4:59
</span>
</td>
</tr>
</table>
</body>
</html>