Home > Language Reference > Classes > Picture
Repaint Method
Redraws the control.
Syntax
Public Sub Repaint()
Remarks
The Repaint method redraws the control. It is used when you dynamically modify the image displayed using the methods of the Bitmap object, in order to update the control.
This example draws 20 random points in an image each time the button is clicked:
Private bm as New Bitmap
Private Sub Form_Load()
bm.Create 100, 40
Set Picture1.Image=bm
End Sub
Private Sub Button1_Click()
Dim i as Integer, c as Long
Dim x as Integer, y as Integer
For i = 1 To 20
x = Rnd()*100
y = Rnd()*40
c = Rnd()*Color(255,255,255)
bm.PutPixel x, y, c
Next i
bm.Flush
Picture1.Repaint
End Sub
System requirements
| System | Minimal version | Remarks |
| Palm OS | Palm OS 3.0 | N/A |