Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread
Message: 96510
BY: Dan Rathbun (danzoid61)
DATE: 2011-05-22 21:29
SUBJECT: RE: SetForegroundWindow and FindWindow

 

call it like this from Ruby:

pw = FindWindow.call(0,@@window_name)

ie, use 0 not nil for the class argument.

Also FindWindow will only find top windows. If you need to find child windows, you must use FindWindowEx, like:

cw = FindWindowEx.call(pw,0,"Edit",0)
.. where pw is the handle of the parent window.
(In this case, it's looking for the first edit control, in a popup dialog which is the parent window.)


Thread View

Thread Author Date
SetForegroundWindow and FindWindowDave Jenkins2011-05-20 00:49
      RE: SetForegroundWindow and FindWindowDave Jenkins2011-05-20 16:07
      RE: SetForegroundWindow and FindWindowDan Rathbun2011-05-22 21:29
      RE: SetForegroundWindow and FindWindowDan Rathbun2011-05-22 21:48
      RE: SetForegroundWindow and FindWindowDan Rathbun2011-05-22 21:53

Post a followup to this message