1

I am experiencing a little problem with DWM extended glassframe in a windows form.

I have extended the glass frame of my winform and added a custom control that draws a tab onto it with a white background, pretty much like google chrome tabs. Then I have added some text in the tab region and up to here, everything work fine.

Now, I have another control (PictureBox) that has a transparent png as image, and, I'd like to allow this control to be dragged and dropped somewhere onto the tab. The result is that half of my PictureBox can be on the tab (white background with text) and the other half on the glass frame.

If my PictureBox has a transparent BackColor, everything is ok as long as I stay on the glass frame but when I get onto the tab, the DWM considers it as transparent and draws the glass instead of the tab background, and as I said, the png is not supposed to be specifically on the tab, or on the glass, it could be dropped across both of them.

Is there a way to handle this ? Thanks for your help, much much much appreciated ;-))

Ps: I've already considered making a CopyFromScreen of the PictureBox region and set it as BackgroundImage, but it doesn't help that much as the part that would be on the glass wouldn't refresh if I move my WinForm.

0 Answers0