by kumarasamyraja (1 Submission)
Category: Windows API Call/Explanation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Sun 8th July 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
for viewing the desktop with some magnification according to the moving of mouse
API Declarations
Private Type POINTAPI
x As Long
y As Long
End Type
Private Declare Function StretchBlt Lib "gdi32" (ByVal hdc 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 nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal dwRop As Long) As Long
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Dim i As Integer
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Sub Form_Load()
i = 0
End Sub
Private Sub Timer1_Timer()
Dim p As POINTAPI
Call GetCursorPos(p)
i = p.x
If p.x < 31 Then p.x = 31
If p.x > 770 Then p.x = 770
If p.y < 9 Then p.y = 9
If p.y > 555 Then p.y = 555
i = i + 1
c = WindowFromPoint(i, 1)
d = GetDC(c)
If (c <> Form1.hwnd) Then
Call StretchBlt(Form1.hdc, 0, 0, Form1.Width, Form1.Height, d, p.x - 33, p.y - 33, 960, 960, vbSrcCopy)
End If
End Sub
No comments have been posted about for viewing the desktop with some magnification according to the moving of mouse. Why not be the first to post a comment about for viewing the desktop with some magnification according to the moving of mouse.