0

I've read many articles on how to create transparent labels but it seems to me that my particular case is not covered. Very simply I have a label placed in the upper right part of the form, which in fact is part of the menu strip. The label displays some info to the user but I wish it were transparent. Ive tried various methods including

lblAct.Parent = mnuMain '(or Me)
lblAct.BackColor = Color.Transparent
lblAct.BringToFront()

but cant get it to work. Anyone have suggestions on how I can make that lable in that position transparent?

Thanks

AGP

MPelletier
  • 16,256
  • 15
  • 86
  • 137
sinDizzy
  • 1,300
  • 7
  • 28
  • 60

1 Answers1

0

Yes, you can't make this work. It's a Windows restriction, transparency effects are relative to the top-level window, stacking effects do not work. You'll see the form as the background, not the menu strip. Hacking a label that asks the menustrip to render itself to create the background is technically possible. But Windows won't generate a paint message when the strip repaints itself. Which will be starkly visible when the user resizes the form for example.

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536