Grafika rysunkowa znika w VB.net
Mam prosty program, który możesz rysować na ekranie za pomocą FillEllipse i FillRectangle. Mój problem polega na tym, że przeciągając kolejne okno nawet na niewielką część ekranu, ta część zostanie wymazana. Dzieje się tak, gdy przeciągasz inne okno, puszczasz i przeciągasz z powrotem. Czy jest jakiś sposób, aby to naprawić?
Dim MyFormObject As Graphics = Me.CreateGraphics
Select Case shape
Case "Ellipse"
MyFormObject.FillEllipse(brush, e.X - CInt(brushWidth / 2), e.Y - CInt(brushHeight / 2), brushWidth, brushHeight)
Case "Rectangle"
MyFormObject.FillRectangle(brush, e.X - CInt(brushWidth / 2), e.Y - CInt(brushHeight / 2), brushWidth, brushHeight)
End Select