IonicWind Software

IWBasic => General Questions => Topic started by: Andy on February 04, 2010, 05:09:22 AM

Title: How to make your program the active (on top) window
Post by: Andy on February 04, 2010, 05:09:22 AM
Hi Everyone,

When my program runs it is not always the active 'on top' window - i.e. it might hide behind another open window on the screen.

Is there any way to make sure my programs appear to be the top active window ?

Thanks,
Andy.
Title: Re: How to make your program the active (on top) window
Post by: AdrianFox on February 04, 2010, 05:41:23 AM
I think it's a question of setforegroundwindow().

You might find this helpful:
http://www.ionicwind.com/forums/index.php/topic,3798.0.html

It was Ficko I think on the forums who gave me the code to ensure my key press was not affecting other programs also open.

Title: Re: How to make your program the active (on top) window
Post by: LarryMc on February 04, 2010, 05:51:27 AM
In the help file under Windows Programming / Opening a Window there is a style flag @TOPMOST that does what you are asking:

OPENWINDOW w1,0,0,350,350,@MINBOX|@MAXBOX|@SIZE|@TOPMOST ,NULL,"Simple Window",&main

LarryMc

Title: Re: How to make your program the active (on top) window
Post by: Andy on February 04, 2010, 05:55:26 AM
Thanks Larry and Adrian - will give it a go !

Regards,
Andy.