Make your own free website on Tripod.com

Draw Wallpaper On Form/PictureBox

'Add a module to your project (In the menu choose Project -> Add Module, Then click Open)
'In the form Property (To show the textbox property, mark it by clicking
'on it and then press F4) change the AutoRedraw propery to True.
'Insert the following code to your module:

Declare Function PaintDesktop Lib "user32" (ByVal hdc As Long) As Long

'Insert the following code to your form:

Private Sub Form_Load()
'If you want to paint a PictureBox, Replace Form1 with the name of your PictureBox,
'And change its AutoRedraw propery to True (As mention above)
Call PaintDesktop(Form1.hdc)
End Sub

Go Back