|
-
Aug 25th, 2000, 08:21 AM
#1
Thread Starter
New Member
I would like to get this to work inside of a RichTextBox -- Currently it works for a form. So instead, I need to capture a screen into something I can parse a string out of.
The code below:
============================================================
Option Explicit
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function BitBlt Lib "gdi32" _
(ByVal hDestDC As Long, _
ByVal x As Long, _
ByVal y As Long, _
ByVal nWidth As Long, _
ByVal nHeight As Long, _
ByVal hSrcDC As Long, _
ByVal xSrc As Long, _
ByVal ySrc As Long, _
ByVal dwRop As Long) As Long
Private Sub Form_Load()
Dim A As Long
Dim s As Long
Form1.AutoRedraw = True
Form1.ScaleMode = 1
A = GetDesktopWindow()
s = GetDC(A)
BitBlt Me.hDC, 0, 0, Screen.Width, Screen.Height, s, 0, 0, vbSrcCopy
End Sub
============================================================
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
|