本帖最后由 cashiba 于 2017-1-24 21:17 编辑 While 1
local $hwnd = WinGetHandle("[active]")
Local $Stat = WinGetState($hWnd)
local $TipTxt = ""
$ht = WinGetTitle($hWnd)
$TipTxt = "---------------"
$TipTxt = $TipTxt & @CRLF & "#" & $ht & "#"
$TipTxt = $TipTxt & @CRLF & "---------------"
$wp = WinGetPos($hWnd)
$TipTxt = $TipTxt & @CRLF & "当前窗口状态数值:" & $Stat
$TipTxt = $TipTxt & @CRLF & "当前窗口绝对坐标:" & $wp[0] & "," & $wp[1]
$TipTxt = $TipTxt & @CRLF & "当前窗口占屏大小:" & $wp[2] & "x" & $wp[3]
$TipTxt = $TipTxt & @CRLF & "当前屏幕宽度高度:" & @DesktopWidth & "x" & @DesktopHeight
ToolTip($TipTxt, Default, Default, "当前活动窗口", 1,3)
HotKeySet("{F9}", "Ext")
Sleep(10)
WEnd
Func Ext()
ToolTip("")
Sleep(1000)
Exit
EndFunc
如上,有3个疑问:
1、在操作窗口时,发现窗口的绝对坐标不是(0,0)而是(-8,-8)......就像称体重时发现磅秤每次都需要调零
怎样才能获得正确的(0,0)呢?
是不是窗口在最小化、最大化状态之间还有一个标准状态呢?
还是显示器没设置好?
2、tooltip的参数中,选项设置为 $TIP_BALLOON (1)+$TIP_CENTER (2) = 气泡提示+在控件出现位置的 X,Y 坐标居中显示
这个“X,Y 坐标居中显示”是指气泡的顶点在(X,Y)点?
3、怎样才能让Tooltip不闪烁?太晃眼了....
|