We help IT Professionals succeed at work.

VB Custom Controls - Send to Front / Send to Back Options

kishore_tvs
kishore_tvs asked
on
I developed a custom control, and used a control array of this control in a form. At run-time how to set Send to Front / Send to Back options dynamically.

That is when a move these controls at run-time, control(1) always moves behind control(0). How to make it come in the front of control(0).

This feature is available in VB IDE at design time.

Thanx
Comment
Watch Question

Can you change the control ZOrder property?. e.g.

Control.ZOrder (0) brings a control to the front

Control.ZOrder (1) sends it to the back
Commented:
TomLaw1999 is correct, but there are VB constants to make it easier to tell which is which and you don't have to remember the numbers:

Control.ZOrder vbBringToFront
Control.ZOrder vbSendToBack

Also, if you dynamically load a control, you should:
  .ZOrder vbBringToFront
before the:
  .visible=true

Explore More ContentExplore courses, solutions, and other research materials related to this topic.