[VB.Net] Как реализовать свойство AutoRedraw

grey1970

Допустим я рисую кружочки в Picture Box при событии Mouse Down ?

evgen5555

Invalidate?

evgen5555

при событии Mouse Down
И, кстати, что за событие такое?

grey1970

    Private Sub PictureBox_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox.MouseDown
Dim pen As New Drawing.Pen(System.Drawing.Color.Red, 2)
Dim g As Graphics = PictureBox.CreateGraphics
g.DrawEllipse(pen, e.X - 3, e.Y - 3, 6, 6)
pen.Dispose
End Sub

bleyman

BASIC /bay'-sic/ /n./ [acronym: Beginner's All-purpose Symbolic Instruction Code] A programming language, originally designed for Dartmouth's experimental timesharing system in the early 1960s, which has since become the leading cause of brain damage in proto-hackers. Edsger W. Dijkstra observed in "Selected Writings on Computing: A Personal Perspective" that "It is practically impossible to teach good programming style to students that have had prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration."
Оставить комментарий
Имя или ник:
Комментарий: