按下ALT键,【你好你好你】自动清空,我真是纳闷,谁能帮忙解决。
Imports System.Drawing.Drawing2D
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim g As Graphics = Panel1.CreateGraphics
Dim ft As New Font("arial", 12, FontStyle.Bold)
g.DrawString("你好你好你", ft, New SolidBrush(Color.Red), 1, 1)
End Sub
End Class
------解决思路----------------------
放到OnPaint事件里去绘制,否则只是按钮按下绘制一次的话,一刷新可不就没了吗
------解决思路----------------------
OnPaint中绘制,否则一重绘就什么都没了
------解决思路----------------------
OnPaint事件 专门绘制图的