A beginner question... but despite studying I'm not sure about how System.Drawing.Graphics works. Does it always need presence of using
statement even if e.Graphics was supplied to me? I already know about Q/A When do I need to use dispose on Graphics.
In other words: in the following example, can C#/VB Using
statement be safely omitted?
Private Sub MyControl_Paint(sender As Object, e As PaintEventArgs) Handles MyBase.Paint
Using e.Graphics
e.Graphics.DrawRectangle(...)
ControlPaint.DrawFocusRectangle(e.Graphics, ...)
End Using
End Sub