VB Code:
'create a new brush with a single, solid color
Dim myBrush As New SolidBrush(Color.Purple)
'create a new basic font. you can mess around and make it cooler
Dim f As Font = New Font(Font.Bold, 20)
'draw the string onto the form. At Position (0 left), (10 top)
Me.CreateGraphics.DrawString("Hello, This is just a test!", f, myBrush, 0, 10)
VB Code:
'Draw line on picturebox
'Put a picturebox on the form named pic
Dim bit As Bitmap = New Bitmap(pic.Width, pic.Height)
Dim g As Graphics = Graphics.FromImage(bit)
Dim myPen As Pen = New Pen(Color.Blue, 3)
g.DrawLine(myPen, 0, 0, pic.Width, pic.Height)
pic.Image = bit