Pregunta

I have some VB6 controls that I have placed on a frame OCX that I have created myself. The issue, is when the frames are made visible, sometimes the controls (in this example 2 comboboxes) are missing, and you can see the background color of the Form through it.

The Usercontrol, is just 2 images with gradients, and a label for the title.

Are there any settings for UserControls that I need to know about that will fix this?

enter image description here

EDITED

AutoRedraw: True Clip Controls: True

¿Fue útil?

Solución

Clip Controls had to be set to False. Fixed me whole problem. Thanks for the answers though

Otros consejos

1) Make sure that your container usercontrol have AutoRedraw=true and ClipControls=true

2) Add the following code to your container usercontrol:

Private Sub UserControl_Paint()
   Refresh
End Sub

Set your background images as

backgroundimage.zorder 1

And your controls

combobox1.zorder 0

You can do this at runtime. I think your combo boxes are pushed back behind your image in the Z-Order. This is similar to the "Bring to front" and "push to back" options you have at design time.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top