【发布时间】:2014-10-04 06:02:30
【问题描述】:
我正在尝试使用 TightVNC 查看器获得Seamless windows 效果。
基本上我将客户端可见区域设置为具有
"C:\Program Files\TightVNC\tvnserver.exe" -controlapp -shareapp <app PID>
然后我使用以下 AutoHotkey 脚本破解 TightVNC 查看器窗口(我隐藏工具栏的位置):
^!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
脚本对边框和其他窗口元素进行转换。
我仍在使用样式,但主要问题是滚动条不会消失。
我怎样才能摆脱它们?
旁注
在本地共享 VNC 窗口的一个有趣的副作用是,您可以在 Windows 中获得某种 X 服务器,这对多显示器系统很有吸引力。
【问题讨论】:
-
滚动条不会被
WS_HSCROLL和WS_VSCROLL窗口样式启用/禁用——这些样式仅用于指示滚动条是否可见。程序使用SetScrollInfo和类似函数控制其滚动条。 -
@JonathanPotter:谢谢,但这正是我想做的:让它们不可见。在 Autohotkey
^中切换属性,它实际上添加/删除了 第二对 滚动条。记事本窗口也会发生这种情况。使用记事本,刚才我成功了:使用 Autohotkey Windows Spy,我看到这些条与主窗口无关,而是与内部Edit1控件相关,因此我为其设置了0x200000样式。使用 TightVNC 仍然无法正常工作。间谍说要破解的窗口是 TvnWindowClass1,它可能不支持0x200000样式。
标签: winapi autohotkey vnc vnc-viewer