|
1 | | -<!-- HTA file defining the display of the .png image for the logon message --> |
2 | | -<!-- Author: Luiz Hamilton Silva - @brazilianscriptguy --> |
3 | | -<!-- Update: May 9, 2024 --> |
| 1 | +<!-- |
| 2 | +HTA that displays a 600x800 PNG for the logon message. |
| 3 | +Shows exactly the image with no extra borders; the window is centered and |
| 4 | +closes automatically after 25 seconds. |
| 5 | +
|
| 6 | +Author: Luiz Hamilton Silva - @brazilianscriptguy |
| 7 | +Updated: July 30, 2025 |
| 8 | +--> |
4 | 9 |
|
5 | 10 | <html> |
6 | | - <hta:application id="oHTA" |
7 | | - border="none" |
8 | | - caption="no" |
9 | | - contextmenu="no" |
10 | | - innerborder="no" |
11 | | - scroll="no" |
12 | | - showintaskbar="no" |
13 | | - /> |
14 | | - <script language="VBScript"> |
15 | | - Sub Window_OnLoad |
16 | | - ' Resize and position the .PNG image |
17 | | - width = 600 : height = 800 |
18 | | - window.resizeTo width, height |
19 | | - window.moveTo screen.availWidth\2 - width\2, screen.availHeight\2 - height\2 |
20 | | - |
21 | | - ' Close the warning window automatically after 05 seconds |
22 | | - idTimer = window.setTimeout("vbscript:window.close", 25000) |
23 | | - End Sub |
24 | | - </script> |
25 | | -<body> |
26 | | - <table border=0 width="100%" height="100%"> |
27 | | - <tr> |
28 | | - <td align="center" valign="middle"> |
29 | | - ' Image to open as logon message |
30 | | - <img src="broadcast-userlogonmessage.png"/> |
31 | | - </td> |
32 | | - </tr> |
33 | | - </table> |
34 | | -</body> |
| 11 | +<hta:application id="oHTA" |
| 12 | + border="none" |
| 13 | + caption="no" |
| 14 | + contextmenu="no" |
| 15 | + innerborder="no" |
| 16 | + scroll="no" |
| 17 | + showintaskbar="no" |
| 18 | +/> |
| 19 | + |
| 20 | +<script language="VBScript"> |
| 21 | + Sub Window_OnLoad |
| 22 | + ' Resize and center the window to match the image size |
| 23 | + width = 600 : height = 800 |
| 24 | + window.resizeTo width, height |
| 25 | + window.moveTo screen.availWidth\2 - width\2, screen.availHeight\2 - height\2 |
35 | 26 |
|
| 27 | + ' Auto-close after 25 seconds |
| 28 | + idTimer = window.setTimeout("vbscript:window.close", 25000) |
| 29 | + End Sub |
| 30 | +</script> |
| 31 | + |
| 32 | +<!-- No margins, no borders, no visible background outside the image --> |
| 33 | +<body style="margin:0; border:none; background:transparent; overflow:hidden;"> |
| 34 | + <!-- 600x800 container centered in the window --> |
| 35 | + <div style="position:absolute; top:50%; left:50%; width:600px; height:800px; |
| 36 | + margin-left:-300px; margin-top:-400px;"> |
| 37 | + <!-- The image is already 600x800; no scaling is applied --> |
| 38 | + <img src="broadcast-userlogonmessage.png" width="600" height="800" |
| 39 | + style="display:block; border:none; padding:0; margin:0;" /> |
| 40 | + </div> |
| 41 | +</body> |
36 | 42 | </html> |
0 commit comments