Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 749
  • Last Modified:

How to force "bring to front" with more then 1 frame on a form

I have 4 frames on a form , during design time they all have set property "bring to front"is true.

When I move one off the frames on the form to another position on that form,   and it reaches on teh form the position of a other frame wich has a "higher"  rang in being "at front" the frame I move will move under that frame, on a fram wich has a lower "rang" it will on top off that frame.

How to get a situation that any frame wich gets status     MouseDown(Button_.......  at mouse click will have the first status in being  "bring to front" so it allways be the frame on top off the other frames
  • 3
1 Solution
Assuming this is VB6, use the ZOrder property, ie:

    Frame1.ZOrder 0 'Bring to front
    Frame2.ZOrder 1 'Send to back
Oh, and if you prefer, you can use the vbBringToFront & vbSendToBack constants in place of the 0 & 1.

    Frame1.ZOrder vbBringToFront 'Bring to front
    Frame2.ZOrder vbSendToBack 'Send to back
BIAPROAuthor Commented:
great!  works perfect, thanks
Glad to have helped :-)

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now