I used this code from the code project in order to display a .png image (with transparency). At line 87 I tried to add a label in which I succeeded but somehow It won’t appear on the form. I tried Refresh, Invalidate but none of them worked. Maybe someone can point me into the right direction.
Share
I think, since you’re using
UpdateLayeredWindowthe “normal” painting mechanism is disabled, i.e. no WM_PAINT messages are sent to the window, and the WinForms library has no chance to render theLabelControls.I found this article about using layered windows on MSDN stating:
So I’m afraid that WinForms isn’t able to work together with your approach. Even if it would, you would likely get unpleasant results since “real” transparency is not easily done with winforms (i.e. the labels wouldn’t show up transparently but would be drawn the parent forms background color)