0

I have a .hta with some HTML code whose sole purpose is to display a 1920x1080 image on a 1920x1080 display, and I want the cursor to be hidden.

I've tried a few things already, notably

<style type="text/css">
     * {
   cursor: none;
     }
</style>

or

<style>
body, html { margin:0; border:0 }
.no-cursor { cursor : none; }
</style>
<div class="no-cursor"><img src="D:\Logos\NewLogo.jpg" /></div>

Ultimately, I feel like everything that relates to the cursor (that works in a regular HTML instance) doesn't work when using the .hta extension.

<HTA:APPLICATION ID="hello"
APPLICATIONNAME="hello"
BORDER="none"
BORDERSTYLE="normal"
CAPTION="no"
CONTEXTMENU="no"
INNERBORDER="no"
MAXIMIZEBUTTON="no"
MINIMIZEBUTTON="no"
NAVIGABLE="no"
SCROLL="no"
SCROLLFLAT="no"
SELECTION="yes"
SHOWINTASKBAR=yes"
SINGLEINSTANCE="yes"
SYSMENU="no"
VERSION="1.0"
WINDOWSTATE="maximize" />
<html>
<head>
<style>
body, html { margin:0; border:0 }
</style>
</head>
<body>
<img src="D:\Logos\NewLogo.jpg" />
</body>
</html>

This is my full working code, with the cursor showing. I just need something in there to hide the cursor when running it from a .hta file.

Many thanks in advance!


Edit:

I found this here: https://www.w3schools.com/cssref/tryit.asp?filename=trycss_cursor With a bunch of different cursor variations, and they ALL work in my HTA. They ALL DO, except for "none". It makes no sense to me!! This is driving me crazy!! :'(

The fact that they all work proves that the code itself is working correctly. But I have no idea why the "none" refuses to work properly.

  • `cursor: none;` seems to work fine in HTA, your problem is rather [IE version specific](https://stackoverflow.com/questions/19567887/javascript-version-in-hta/19570684#19570684). IE had named some cursor properties differently, I'd recall _pointer_ was "hand" in some older versions, also if you added a cursor file, only a .cur file was accepted. – Teemu Sep 18 '19 at 11:15
  • Hi Teemu and thanks for your help. But (and I've added it in Edit in my original post) I've found this https://www.w3schools.com/cssref/tryit.asp?filename=trycss_cursor and tried all the variations of cursor representations in my HTA and they all work. They all do except for the "none". And I have absolutely no idea why. So this proves that my IE version is not too old and that it should work (right?). – RockfordQC Sep 19 '19 at 13:45
  • Hmm ... as I said, in my HTA also `cursor: none` works (running in IE11 mode). Make sure the options in Internet settings | Security | IntranetZone allow practically everything. – Teemu Sep 19 '19 at 14:39

1 Answers1

0

Works for me:

test.hta

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
  <title>No Cursor</title>
  <style>
    .no-cursor { cursor: none; }
  </style>
</head>
<body>
  <img class="no-cursor" src="https://storage.googleapis.com/webdesignledger.pub.network/WDL/6f050e39-windows_10_logoblue.svg-copy_windows.jpg" />
</body>
</html>
bosscube
  • 189
  • 10