title: TightVNC Viewer seamless windows via Autohotkey script (or mirroring Windows app windows)
body: <p>I am trying to obtain the <a href="https://www.virtualbox.org/manual/ch04.html#seamlesswindows" rel="nofollow">Seamless windows</a>  effect with  TightVNC Viewer.<br>
  Basically I set the client visible area to an application with </p>
  
  <pre><code>"C:\Program Files\TightVNC\tvnserver.exe"  -controlapp  -shareapp &lt;app PID&gt;
  </code></pre>
  
  <p>then I use the following AutoHotkey script to hack TightVNC Viewer window (where I hide the toolbar): </p>
  
  <pre><code>^!h::
  IfWinExist, antonio - TightVNC Viewer
  {
     WinSet, Style, ^0xC00000  ; title bar, without you can move only with win-key 
     WinSet, Style, ^0x800000  ; thin-line border
     WinSet, Style, ^0x400000  ; dialog frame
     WinSet, Style, ^0x40000   ; sizing border, without you cannot resize
     WinSet, Style, ^0x200000  ; vertical scroll bar
     WinSet, Style, ^0x100000  ; horizont scroll bar
  }
  return
  ; http://www.autohotkey.com/docs/misc/Styles.htm
  </code></pre>
  
  <p>The script toogles the border and other window elements.<br>
  I am still working with the styles, but the main problem is that scrollbars don't go away.</p>
  
  <p>How can I get rid of them?</p>
  
  <h2>Side note</h2>
  
  <p>An interesting side effect of sharing windows in VNC locally, that is with the loopback connection, is that you can obtain kinda of X Server in Windows, appealing for multi-monitors systems.</p>