mgazza
asked on
Lots of topmost forms in one application
hi iv had a bug 4 a while now that i cant seam to squish
i want more than one form per application to stay topmost but i can only get 1 form at any one time topmost any ideas...
each child form calls when its deactivated
SetWindowPos(Application.H andle,HWND _TOPMOST,0 ,0,0,0,
SWP_NOACTIVATE or SWP_HIDEWINDOW or SWP_NOSIZE or SWP_NOMOVE);
the only problem is only the first form that was created retains topmost
must be something very simple! lol
regards mark,
i want more than one form per application to stay topmost but i can only get 1 form at any one time topmost any ideas...
each child form calls when its deactivated
SetWindowPos(Application.H
SWP_NOACTIVATE or SWP_HIDEWINDOW or SWP_NOSIZE or SWP_NOMOVE);
the only problem is only the first form that was created retains topmost
must be something very simple! lol
regards mark,
ASKER
the key strokes dont go though the main form i must be able to set more than one infront maybe if i use a mdi form and set everything inside that..... any sujections would be gr8!
regards
mark.
regards
mark.
What do you mean with "each child form calls when its deactivated"?
Form is deactivated when another form in same application receives focus. If the whole app is deactivated, it doesn't mean that form is deactivated. From Delphi help:
"Use OnDeactivate to perform special processing when the form transitions from being the active form to another form in the same application becoming the active form. If activation goes to another application, this event is not triggered. To determine if another application has become active, Use the TApplication object’s OnDeactivate event."
Maybe you should process application's onDeactivate event, not forms'?
Form is deactivated when another form in same application receives focus. If the whole app is deactivated, it doesn't mean that form is deactivated. From Delphi help:
"Use OnDeactivate to perform special processing when the form transitions from being the active form to another form in the same application becoming the active form. If activation goes to another application, this event is not triggered. To determine if another application has become active, Use the TApplication object’s OnDeactivate event."
Maybe you should process application's onDeactivate event, not forms'?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ty that works i ant i noob just couldnt figure out why i changed ondeactivate to onidle cause its just better lol
best regards mark
best regards mark
Didn't understand your english...
ASKER
oh sorry!
i said, thankyou that works im not a newby, i just never done this before i changed the on activate to onidle but this is not needed since you only need to call this function once :)
best regards mark
i said, thankyou that works im not a newby, i just never done this before i changed the on activate to onidle but this is not needed since you only need to call this function once :)
best regards mark
If you need to change which window is in front you can do a "BringToFront"