Making a window the "active window" ...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Making a window the "active window" ...

Dennis smith-4
If VW opens a window (e.g. because of some timed event), it does not
became the active "windows" (XP, 7, ..) window.

Anyone know of a way of doing this?  even via some external (to VW)
utility program?

--
Dennis Smith                         +1 416.798.7948
Cherniak Software Development Corporation   Fax: +1 416.798.0948
509-2001 Sheppard Avenue East        [hidden email]
Toronto, ON M2J 4Z8              sip:[hidden email]
Canada         http://www.CherniakSoftware.com
Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Making a window the "active window" ...

Holger Guhl
If VisualWorks is the active application (one of its windows is the
active one), then it's sufficient to send #raise to the window. If VW is
not the active application, then it's hard to accomplish. The reason is
that Windows and its decisive function SetForegroundWindow() does not
allow to steal other applications' focus. You might say "other
applications can". I don't know how they do but I could not accomplish
that for VisualWorks, at least not in the limited range of Support.
If you like, have a look at Support Resolution Res97526 (How to bring a
(dialog) window on MS Windows to front?). The parcel comment has enough
comment to get a first understanding of the background, and there are
also some references on approaches that sound promising.

Dennis Smith schrieb:
> If VW opens a window (e.g. because of some timed event), it does not
> became the active "windows" (XP, 7, ..) window.
>
> Anyone know of a way of doing this?  even via some external (to VW)
>
>
> utility program?

Holger Guhl
--
Senior Consultant * Certified Scrum Master * [hidden email]
Tel: +49 231 9 75 99 21 * Fax: +49 231 9 75 99 20
Georg Heeg eK Dortmund
Handelsregister: Amtsgericht Dortmund  A 12812

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Making a window the "active window" ...

Holger Kleinsorgen-4
In reply to this post by Dennis smith-4
if your merely want to bring the window to top, you can use the attached
code. it does not activate the focus though, and IMHO that's bad
practice anyway.

Am 07.06.2010 17:32, schrieb Dennis Smith:
> If VW opens a window (e.g. because of some timed event), it does not
> became the active "windows" (XP, 7, ..) window.
>
> Anyone know of a way of doing this?  even via some external (to VW)
> utility program?
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

BringWindowToTop.zip (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Making a window the "active window" ...

Dennis smith-4
I agree -- in general.  My case is different.

I have a VW window open, and a windows explorer window open.
I select the windows window (select by clicking its title bar) -- I then select one or more files and drag-drop them onto the VW window.  This works nicely -- guess which window is the active "windows window"??  Not my VW window -- so the users sees something happen on the VW window, the cursor goes to a field to be entered and the user types -- the "windows window" starts selecting different files :(

On 07/06/2010 12:15 PM, Holger Kleinsorgen wrote:
if your merely want to bring the window to top, you can use the attached code. it does not activate the focus though, and IMHO that's bad practice anyway.

Am 07.06.2010 17:32, schrieb Dennis Smith:
If VW opens a window (e.g. because of some timed event), it does not
became the active "windows" (XP, 7, ..) window.

Anyone know of a way of doing this?  even via some external (to VW)
utility program?

_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

-- 
Dennis Smith                 		         +1 416.798.7948
Cherniak Software Development Corporation   Fax: +1 416.798.0948
509-2001 Sheppard Avenue East        [hidden email]
Toronto, ON M2J 4Z8              [hidden email]
Canada			         http://www.CherniakSoftware.com
Entrance off Yorkland Blvd south of Sheppard Ave east of the DVP

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Making a window the "active window" ...

Holger Kleinsorgen-4
SetForegroundWindow() will work in this case, because the VW window
where the file was dropped receives an event. therefore, send
SetForegroundWindow() in the event handler for wm_dropfiles, and your
window should become the active window.

> I agree -- in general.  My case is different.
>
> I have a VW window open, and a windows explorer window open.
> I select the windows window (select by clicking its title bar) -- I then
> select one or more files and drag-drop them onto the VW window. This
> works nicely -- guess which window is the active "windows window"?? Not
> my VW window -- so the users sees something happen on the VW window, the
> cursor goes to a field to be entered and the user types -- the "windows
> window" starts selecting different files :(
>
> On 07/06/2010 12:15 PM, Holger Kleinsorgen wrote:
>> if your merely want to bring the window to top, you can use the
>> attached code. it does not activate the focus though, and IMHO that's
>> bad practice anyway.
>>
>> Am 07.06.2010 17:32, schrieb Dennis Smith:
>>> If VW opens a window (e.g. because of some timed event), it does not
>>> became the active "windows" (XP, 7, ..) window.
>>>
>>> Anyone know of a way of doing this? even via some external (to VW)
>>> utility program?
>>>
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc