for viewing the desktop with some magnification according to the moving of mouse
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
Rate for viewing the desktop with some magnification according to the moving of mouse
(1(1 Vote))
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
for viewing the desktop with some magnification according to the moving of mouse Comments
No comments yet — be the first to post one!
Post a Comment