VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Captures ur windows action into ur Vb form.Even ur mouse actions.

by Martin Anbu Selvan (18 Submissions)
Category: Windows System Services
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 28th April 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Captures ur windows action into ur Vb form.Even ur mouse actions.

API Declarations


'[email protected]


Private Const SRCCOPY = &HCC0020
Private Type POINTAPI
X As Long
Y As Long
End Type
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 Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long
Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long



Rate Captures ur windows action into ur Vb form.Even ur mouse actions.



'action does not takes place

Private Sub Form_Load()
Timer1.Enabled = True
Timer1.Interval = 1
SetWindowPos Me.hwnd, -1, 0, 0, 0, 0, 1
Form1.AutoRedraw = True
End Sub

Private Sub Timer1_Timer()
Dim xy As POINTAPI
Dim wnd As Long, wndc As Long
GetCursorPos xy
wnd = WindowFromPoint(xy.X, xy.Y)
wndc = GetDC(wnd)
Form1.Refresh
BitBlt Me.hDC, 0, 0, Screen.Width, Screen.Height, wndc, 0, 0, SRCCOPY
End Sub

Download this snippet    Add to My Saved Code

Captures ur windows action into ur Vb form.Even ur mouse actions. Comments

No comments have been posted about Captures ur windows action into ur Vb form.Even ur mouse actions.. Why not be the first to post a comment about Captures ur windows action into ur Vb form.Even ur mouse actions..

Post your comment

Subject:
Message:
0/1000 characters