June 23, 2024, 01:11:10 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


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 2 Guests 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.