I am trying to load an image into the screen using api, and no picture box controls...I have the following code:
VB Code:
Private Sub Form_Activate() 'Create dc device BackDC = CreateCompatibleDC(Me.hdc) 'Load Image into dc BackIM = LoadImage(0, App.Path & "\back.bmp", 0, 0, 0, &H10) 'Associate dc with loaded image SelectObject BackDC, BackIM 'Draw image BitBlt Me.hdc, 10, 10, 50, 50, BackDC, 0, 0, vbSrcCopy End Sub
I don't get any error, but the image simply doesn't appear in the screen. I have my form set to pixels, and I've also tried setting the AutoRedraw to true, and add a Form1.cls, but that doesn't work either....
Any idea?
Thanks![]()




Reply With Quote