0

I like batch-file programming, but it runs quiet, I dont want to expose the code, so I decided to make a HTA window to show its running..

Even if its showing, I want it borderless, but which can not move, so I need it to be movable or move with mouse, like, if im approaching to the window, it show move from the cursor, like "catch me if you can", I saw some button, images examples, but with window, I'm not able to make it

<HTML><HEAD><HTA:application border="none" showInTaskbar="no" innerBorder="no" scroll="no" singleInstance="yes" selection="no" version="1.0"/>
<style type="text/css">
    body 
    { 
        color: #FFFFFF; background: #1E1E1E; font-family: "Lucida Console"; font-size: 11px; 
    }
</style>
<script type="text/javascript">
document.onmouseenter=MoveWindow;
document.onmouseover=MovenoWindow;
document.onload=resize();
document.onmouseenter=MoveWindow;
document.onmouseover=MovenoWindow;
    function resize()
    {
        window.moveTo(screen.width/2-116,screen.height/2-screen.height/2)
        window.resizeTo(220,20)
    }
    function MoveWindow (event) 
    {
        if (!event) 
        {
            event = window.event;
        }
        cursor = { x : 0, y : 0 };
        cursor.x = event.clientX;
        cursor.y = event.clientY;
        window.moveBy (cursor.x-1,cursor.y-1);
        }
    function MovenoWindow (event) 
    {
        if (!event) 
        {
            event = window.event;
        }
        cursor = { x : 0, y : 0 };
        cursor.x = event.clientX;
        cursor.y = event.clientY;
        window.moveBy (cursor.x-10,cursor.y-10);
    }
</script></head>
<body topmargin="5" leftmargin="5" marginheight="0" marginwidth="0">
<center>CATCH ME IF YOU CAN</center></BODY></HTML>
Phiter
  • 14,570
  • 14
  • 50
  • 84
n0f3a6
  • 9
  • 2
  • this code is running, but not perfect.. – n0f3a6 Jun 24 '16 at 14:35
  • `var starMoving; var posX; var posY; var isMoving=false; function setPos() { posX=event.screenX-(220/2); posY=event.screenY-(20/2); if( isMoving == true ) { window.moveTo(posX,posY); } } function moving() { isMoving=true; } function stopMoving() { isMoving=false; }` – n0f3a6 Jun 24 '16 at 18:56
  • hi, i modified my code and satisfied with this now.. check it out... this made it movable borderless window – n0f3a6 Jun 24 '16 at 19:09

0 Answers0