1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
PictureBox1.BackgroundImage = Image.FromFile(Application.StartupPath & "\img.jpg")
End Sub
Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
MyDraw()
End Sub
Private Sub MyDraw()
Using gr As Graphics = PictureBox1.CreateGraphics
gr.DrawString("My Text SomeWhere", New Font("Arial", 20), Brushes.Yellow, 10, 10)
End Using
End Sub
End Class |