PDA

Click to See Complete Forum and Search --> : Put frame topmost on another form


Dec 11th, 1999, 04:45 AM
I want to show/hide a frame (containing label box) as the topmost (.zorder 0) on another form (which may be hidden). This can occur at anytime (activated by comms interrupt).
I can do .visible =true .zorder 0 but when the target form is shown, (or refreshed during various operation when that form is active) it ignores or superceedes the frames settings and so burys the frame down the zorder.
Can I force the frame on top? or do I have to constantly loop testing a flag in the target form's code? (ugly!)
I have tried SetWindowPos but doesnt seem to work for frames??

atomsheep
Dec 11th, 1999, 09:10 AM
i think it works for me:

i made two forms, Form1 and Form2. Form2 has 3 frames, Frame1, Frame2, and Frame3. Frame1 is at the bottom of the zorder.

From Form1, I call Form2.Frame1.ZOrder, and Frame1 which is found on Form2 goes to the top, regardless of whether or not Form2 is visible, or whether Frame1 is visible or not.

maybe you have something else in your code that is placing the other forms on top of the form you want on top.. if that makes any sense.