
Setting the Picture property of a form ...
I use the following code to create a background:
Dim P As StdPicture
Dim i As Long, j As Long
Dim W As Long, H As Long
Dim di As Long
Dim srcDC As Long
Dim srcBITMAP As Long
Set P = LoadPicture("B1.bmp")
W = ScaleX(P.Width, vbHimetric, vbPixels)
H = ScaleY(P.Height, vbHimetric, vbPixels)
srcDC = CreateCompatibleDC(hdc)
srcBITMAP = SelectObject(srcDC, P)
For i = 0 To ScaleWidth \ W
For j = 0 To ScaleHeight \ H
di = BitBlt(hdc, i * W, j * H, W, H, srcDC, 0, 0, SRCCOPY)
Next
Next
di = SelectObject(srcDC, srcBITMAP)
di = DeleteDC(srcDC)
However I want to store the new BITMAP to the picture property of the
form, so as I must not redraw it every time.
Is it possible?
Dimitris.