我在激活一个窗口时出现如下情况,请大家指点一下,多谢我的程序是这样的
.....
WinWnd = FindWindow(vbNullString, “DXP”)
If WinWnd = 0 Then MsgBox "Couldn't find the window ...": Exit Sub
gvisible = IsWindowVisible(WinWnd)
While gvisible = 0
Sleep 300
gvisible = IsWindowVisible(WinWnd)
Wend
SetWindowPos WinWnd, HWND_TOPMOST, 0, 0, 640, 480, SWP_DRAWFRAME
SetForegroundWindow WinWnd
GetWindowRect WinWnd, gRect
MsgBox "x1:" & gRect.Left & ",y1:" & gRect.Top & ",x2:" & gRect.Right & ",y2:" & gRect.Bottom
只要我设置setwindowpos中,窗口坐标的位置,或者窗口大小,就会出现一个同名的窗口出现,挡在我要启动的应用窗口之前,不知道是什么原因
好像他们两个的窗口句柄是一个
.....
WinWnd = FindWindow(vbNullString, “DXP”)
If WinWnd = 0 Then MsgBox "Couldn't find the window ...": Exit Sub
gvisible = IsWindowVisible(WinWnd)
While gvisible = 0
Sleep 300
gvisible = IsWindowVisible(WinWnd)
Wend
SetWindowPos WinWnd, HWND_TOPMOST, 0, 0, 640, 480, SWP_DRAWFRAME
SetForegroundWindow WinWnd
GetWindowRect WinWnd, gRect
MsgBox "x1:" & gRect.Left & ",y1:" & gRect.Top & ",x2:" & gRect.Right & ",y2:" & gRect.Bottom
只要我设置setwindowpos中,窗口坐标的位置,或者窗口大小,就会出现一个同名的窗口出现,挡在我要启动的应用窗口之前,不知道是什么原因
好像他们两个的窗口句柄是一个
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货