|
-
Jul 12th, 2000, 04:26 AM
#1
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.
-
Jul 12th, 2000, 04:34 AM
#2
Addicted Member
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
-
Jul 12th, 2000, 04:48 AM
#3
Well I'm not sure about they best way, but this is what I used. Set the Form's AutoRedraw property to "TRUE".
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
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.
[Edited by Dreamlax on 07-12-2000 at 05:50 AM]
-
Jul 12th, 2000, 04:58 AM
#4
Addicted Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|