Previous | Index | Next 

[PRB] Transparent VB6 Label controls aren’t transparent in the VB.NET application

Setting the BackColor property of a VB6 Label to Transparent control makes the label’s background truly transparent – that is, you can actually see the form’s background “through” the label, even if clicks on the background are routed to the Label control. Conversely, setting the BackColor property of a VB.NET Label to Transparent is equivalent to setting it equal to the container’s BackColor property, and no transparency effect is achieved.

There is no easy workaround for this problem. If the original VB6 application uses the Label control just to display text, you can get replace the control with an appropriate Print statement. However, this fix doesn’t work if the label is associated with a hotkey or if the application has set a handler for the label’s MouseDown, MouseMove, and MouseUp events.

 

Previous | Index | Next