Why don't you use BitBlt? As long as the form satys still and none of the windows behind it close, it should work fine.
Printable View
Why don't you use BitBlt? As long as the form satys still and none of the windows behind it close, it should work fine.
Hi,
How do I use it? I don't really know very many commands yet as I only started with VB a little while ago.
Thanks,
-Git
Well I'm not sure about they best way, but this is what I used. Set the Form's AutoRedraw property to "TRUE".
Tell me if this works, if it doesn't you either have an old version of Visual Basic, or something's wrong with my code.Code:'Create a module and put this in it:
Declare Function BitBlt Lib "gdi32.dll" (ByVal hdcDest As Long, ByVal nXDest As Long, ByVal nYDest As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hdcSrc As Long, ByVal nXSrc As Long, ByVal nYSrc As Long, ByVal dwRop As Long) As Long
Declare Function GetDesktopWindow Lib "user32.dll" () As Long
Declare Function GetDC Lib "user32.dll" (ByVal hWnd As Long) As Long
'End of module, just put the rest of this code in the Form's Load event or whereevere else you want it.
Private Sub Form_Load()
Dim TPPX As Long
Dim TPPY As Long
TPPX = Screen.TwipsPerPixelX
TPPY = Screen.TwipsPerPixelY
Me.Hide
BitBlt Me.hDC, 0, 0, Me.Width / TPPX, Me.Height / TPPY, GetDC(GetDesktopWindow), Me.Top, Me.Left, &HCC0020
Me.Show
End Sub
[Edited by Dreamlax on 07-12-2000 at 05:50 AM]
It didn't quite work - the background of the form was like a screen shot, and it didn't go away.
I've redesigned the interface, so I won't need it now.
Thanks anyway. =)
-Git