Tray Icon and Window Restoration without stealing focus 
Author Message
 Tray Icon and Window Restoration without stealing focus

Hi guys,

I have a single windowed app that sits 99% of its time in the system
tray. Occassionally it restores itsself as a little box on the top
left of the screen to display a status message ("Mark is away from his
desk").

Whenever the little message window pops up however (by posting
EVENT:Restore to the window), it grabs focus from the current window
you are working in.  Much of a pain.  I can't think of any way to
restore a window without grabbing focus from any other running apps
using clarion.

The alternative is to use tooltips, however you can't attach a tooltip
to a window... I might try some of the 'balloon' type ActiveX controls
if I can't solve this.

Anyone have any idea's?

Mark



Tue, 08 Nov 2005 15:17:07 GMT  
 Tray Icon and Window Restoration without stealing focus


Quote:
> Hi guys,

> I have a single windowed app that sits 99% of its time in the system
> tray. Occassionally it restores itsself as a little box on the top
> left of the screen to display a status message ("Mark is away from his
> desk").

> Whenever the little message window pops up however (by posting
> EVENT:Restore to the window), it grabs focus from the current window
> you are working in.  Much of a pain.  I can't think of any way to
> restore a window without grabbing focus from any other running apps
> using clarion.

> The alternative is to use tooltips, however you can't attach a tooltip
> to a window... I might try some of the 'balloon' type ActiveX controls
> if I can't solve this.

> Anyone have any idea's?

> Mark

Depending on the OS you can try the mspowertools. I'm sure there is a
setting to deny background windows from becoming the primary window of
focus, instead they flash on the toolbar like a minimised app.


Tue, 08 Nov 2005 16:04:59 GMT  
 Tray Icon and Window Restoration without stealing focus
I have found that the order in which you iconize / hide the window causes
this affect.

I use the following to iconize

window{prop:iconize} = 1
window{prop:hide} = 1     ! this removes the window button from the taskbar

I use the following to restore the window without taking focus but bringing
it to the front.

window{prop:iconize} = 0
window{prop:hide} = 0
WinOnTop()            ! these are Winevent functions you might need
equivalents
WinNotOnTop()       ! these are Winevent functions you might need
equivalents

Derek Noffke
CapeSoft


Quote:
> Hi guys,

> I have a single windowed app that sits 99% of its time in the system
> tray. Occassionally it restores itsself as a little box on the top
> left of the screen to display a status message ("Mark is away from his
> desk").

> Whenever the little message window pops up however (by posting
> EVENT:Restore to the window), it grabs focus from the current window
> you are working in.  Much of a pain.  I can't think of any way to
> restore a window without grabbing focus from any other running apps
> using clarion.

> The alternative is to use tooltips, however you can't attach a tooltip
> to a window... I might try some of the 'balloon' type ActiveX controls
> if I can't solve this.

> Anyone have any idea's?

> Mark



Tue, 08 Nov 2005 16:38:48 GMT  
 Tray Icon and Window Restoration without stealing focus
Hi Mark,

What about giving the window the toolbox attribute - think that does the
job?


Quote:
> Hi guys,

> I have a single windowed app that sits 99% of its time in the system
> tray. Occassionally it restores itsself as a little box on the top
> left of the screen to display a status message ("Mark is away from his
> desk").

> Whenever the little message window pops up however (by posting
> EVENT:Restore to the window), it grabs focus from the current window
> you are working in.  Much of a pain.  I can't think of any way to
> restore a window without grabbing focus from any other running apps
> using clarion.

> The alternative is to use tooltips, however you can't attach a tooltip
> to a window... I might try some of the 'balloon' type ActiveX controls
> if I can't solve this.

> Anyone have any idea's?

> Mark



Tue, 08 Nov 2005 18:13:54 GMT  
 Tray Icon and Window Restoration without stealing focus


Quote:
> Hi guys,

> I have a single windowed app that sits 99% of its time in the system
> tray. Occassionally it restores itsself as a little box on the top
> left of the screen to display a status message ("Mark is away from his
> desk").

> Whenever the little message window pops up however (by posting
> EVENT:Restore to the window), it grabs focus from the current window
> you are working in.  Much of a pain.  I can't think of any way to
> restore a window without grabbing focus from any other running apps
> using clarion.

> The alternative is to use tooltips, however you can't attach a tooltip
> to a window... I might try some of the 'balloon' type ActiveX controls
> if I can't solve this.

> Anyone have any idea's?

> Mark

Depending on the OS you can try the mspowertools. I'm sure there is a
setting to deny background windows from becoming the primary window of
focus, instead they flash on the toolbar like a minimised app.


Tue, 08 Nov 2005 22:37:03 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Winico behaviour - Icon in tray but window never disappear from Windows taskbar

2. tray icon in Windows

3. window opened but without focus

4. focus being stolen

5. Tkinter window on top without keyboard focus?

6. Uppdate of window without input focus

7. Wish steals focus and then Hangs

8. configure fails for TkPixmap/Steal/Icon

9. - Tcl without windows, Tcl without Tk for windows.

10. Tray icon

11. Tray icon template - Need Help

12. WinSock OCX / Icons in system tray - Example Application

 

 
Powered by phpBB® Forum Software