When screen scaling is changed to 125%, 150% or a custom value, the following HTA scales accordingly, except for checkboxes and radio buttons. How can I make those elements also scale proportionally with the user's screen scaling setting?
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" http-equiv="X-UA-Compatible" content="IE=9">
<script language="VBScript">
x = screen.availWidth * 1/3 'use one third of the available width
y = screen.availHeight * 3/4 'use three quarters of the available height
Window.ResizeTo x, y
Window.MoveTo (screen.availWidth - x)/2, (screen.availHeight - y)/2 'Center
</script>
<style>
body {background-color:LemonChiffon; font-family:Segoe UI; font-size:11pt}
</style>
</head>
<body>
<h1>Heading 1</h1> Body text
<h2>Heading 2</h2> Body text
<h3>Heading 3</h3> Body text<br><br>
<input type=button value="Button"><br>
<input type=checkbox id=cb1>Check box<br>
<input type=radio id=rb1 name=test><input type=radio id=rb2 name=test>Radio buttons<br>
</body>
In HTAs, checkboxes and radio buttons can be scaled using the
zoomproperty. Read the current AppliedDPI value from the registry, convert that to a scale value and apply it to all check box and radio button elements. The scaled elements are kept aligned with the text by applying thevertical-align:bottomstyle. Here's the code: