October 31, 2025, 11:55:50 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


How to make your program the active (on top) window

Started by Andy, February 04, 2010, 05:09:22 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

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.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

AdrianFox

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.

Adrian Fox

LarryMc

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

LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

Thanks Larry and Adrian - will give it a go !

Regards,
Andy.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.