Order of windows

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Derek
Addict
Addict
Posts: 2354
Joined: Wed Apr 07, 2004 12:51 am
Location: England

Order of windows

Post by Derek »

It would be nice to have some native commands to arrange the order of windows, I sometimes have several windows overlapping and would like to be able to force a particular window to the front.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

SetActiveWindow() doesn't work for you?
BERESHEIT
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

Moreover, there are still StickyWindow() (if you want to "force" your windows to appear at the front) and SetForegroundWindow_()...
PB 4.30

Code: Select all

onErrorGoto(?Fred)
Derek
Addict
Addict
Posts: 2354
Joined: Wed Apr 07, 2004 12:51 am
Location: England

Post by Derek »

:oops:

Never thought of using setactivewindow(), I assumed (quite wrongly) that it only gave the window focus, not actually bringing it to the front.

I did a search and didn't get any results other than hacks etc, most of them a few years old.

Haven't actually had to force a window to the front before so I hadn't gone looking for the command.
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

Derek wrote:I assumed (quite wrongly) that it only gave the window focus, not actually bringing it to the front.
Actually, that's right. IIRC SetActiveWindow() only re-organizes the internal Z-window order, but it does not really bring a window to the front like ALT+TAB does.
If you really want to bring a window to the front, then use SetForegroundWindow_() instead.
PB 4.30

Code: Select all

onErrorGoto(?Fred)
Derek
Addict
Addict
Posts: 2354
Joined: Wed Apr 07, 2004 12:51 am
Location: England

Post by Derek »

I see, thanks.
Post Reply