Hello, I need that when you click on any place in the application with the right mouse button, you can move the window across the screen with border = none

<html> <head> <script language=javascript> var winWidth = 300; // ΡˆΠΈΡ€ΠΈΠ½Π° ΠΎΠΊΠ½Π° var winHeight = 300; // высота ΠΎΠΊΠ½Π° window.resizeTo(winWidth, winHeight); var winPosX = 100; var winPosY = 100; window.moveTo(winPosX, winPosY); </script> <HTA:APPLICATION APPLICATIONNAME="Operating System Version" SCROLL="no" SINGLEINSTANCE="yes" BORDER="none" MAXIMIZEBUTTON="no" ;> <style> * { font-family: sans-serif; } html {} body { filter: progid:DXImageTransform.Microsoft.Gradient (GradientType=0, StartColorStr='#cccc99', EndColorStr='#ffffaa'); margin: 0; border: 3px solid #ee9; border-left: 5px solid #ee9; background-color: #ffa; } textarea { overflow: auto; border: 0; width: 100%; height: 80%; background: 0; color: #aa1; } #menu { background-color: #ee9; display: block; } #menu ul { position: absolute; background-color: #ee9; margin: 0; padding: 0; display: block; top: 0; left: 0; } #menu ul li { background-color: #ee9; list-style-type: none; float: left; padding: 10px; display: block; font-size: 12px; color: #aa1; } </style> <title>Flat notes</title> </head> <body> <div id="menu"> <ul> <li> Π‘ΠΎΡ…Ρ€Π°Π½ΠΈΡ‚ΡŒ </li> <li> ΠžΡ‚ΠΊΡ€Ρ‹Ρ‚ΡŒ </li> <li onclick="about()"> О ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ΅ </li> </ul> </div> <br><br> <textarea></textarea> <script type="text/javascript"> function about() { confirm("Π—Π°ΠΌΠ΅Ρ‚ΠΊΠΈ v1.0 by suoxx"); } </script> </body> </html> 

    1 answer 1

     <html> <hta:application maximizeButton=no border=none innerborder=no scroll=no selection=no contextMenu=no caption=no showInTaskBar=no singleinstance=yes version=1.0 > <body style="background-color: #ffa;" ondblClick="window.close()">ΠŸΠ΅Ρ€Π΅ΠΌΠ΅ΡΡ‚ΠΈΡ‚ΡŒ: ΠŸΡ€Π°Π²Ρ‹ΠΉ ΠΊΠ»ΠΈΠΊ<br>Π—Π°ΠΊΡ€Ρ‹Ρ‚ΡŒ: Π”Π²ΠΎΠΉΠ½ΠΎΠΉ ΠΊΠ»ΠΈΠΊ ΠΈΠ»ΠΈ Alt+F4</body> <script> var winWidth = 300; var winHeight = 300; window.resizeTo(winWidth, winHeight); window.moveTo(screen.width / 2 - winWidth / 2, screen.height / 2 - winHeight / 2); document.onmousemove = function() { if ((event.button != 0) && (event.button != 1)) { //if (event.button!=0){ window.moveBy(event.x - x0, event.y - y0); return false; } document.body.style.cursor = "auto"; } document.onmousedown = function() { if (event.button != 1) { document.body.style.cursor = "move"; x0 = event.x; y0 = event.y; } } </script> </html>