16,554
社区成员
发帖
与我相关
我的任务
分享
Public Class Form1
Dim g2 As Graphics
Dim xp1 As Bitmap = My.Resources.sanjiao
Dim bgimage As Bitmap
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
bgimage = New Bitmap(PictureBox1.Width, PictureBox1.Height) '创建相同大小的内存位图
g2 = Graphics.FromImage(bgimage)
PictureBox1.Image = bgimage
End Sub
Private Sub PictureBox1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint
If g2 IsNot Nothing AndAlso xp1 IsNot Nothing Then
g2.DrawImage(My.Resources.tr, 0, 0)
g2.DrawImage(xp1, 20, 20)
End If
End Sub
End Class