Winforms - window without caption - paint artefact
Something not right when window is displayed with dynamic caption.
I have following code which enables/disables caption on key:
Me.ControlBox = Not Me.ControlBox
If Me.ControlBox Then
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
Else
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
End If
Initially window is shown without caption and occupies full screen.
Everything is OK.
When caption is displayed and then removed with this code, there is small
arefact left on screen - part of caption to the right of last control button
and screen area expanding below it. If there was bitmap overlapping this
area, you can see remaining pixels. New bitmap is shown under this area
(it's painted over new bitmap). Invalidate/Update doesn't change this.
Seemingly eigther I do something wrong, or .Net 2.0 painter. Could this be
corrected and how?
Alex
Date:Mon, 16 Jul 2007 11:12:08 -0400
Author:
|