Controls with a ‘Transparent’ color actually render their parent’s background, so you’re seeing the White background of the Form, not the PictureBox. Three easy ways to deal with this:
- Use a Panel with it’s ‘BackgroundImage’ property set instead of a PictureBox, and parent the LinkLabels to the panel (PictureBoxes generally don’t have children)
- Set the BackgroundImage of the Form to the image (basically the same as 1 above, but avoids the extra control)
- In code, set the Parent of the LinkLabel to be the PictureBox. You’ll need to update the LinkLabel’s position to match the new origin of the parent if the PictureBox isn’t at (0,0)
(Shawn Burke on microsoft.public.dotnet.framework.windowsforms newsgroup)
Share with