📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "放大镜"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.Timer Timer1
Left = 3840
Top = 2520
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Type POINTAPI
x As Long
y As Long
End Type
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
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 Const SRCCOPY = &HCC0020
Private Const SWP_NOMOVE = &H2
Private Const HWND_TOPMOST = -1
Private Pointcre As POINTAPI
Private Sub zoom()
Dim x As Long
Dim y As Long
Dim z As Long
z = GetCursorPos(Pointcre)
x = Pointcre.x - 20
y = Pointcre.y - 20
z = StretchBlt(Me.hdc, 0, 0, 300, 200, GetDC(0), x, y, 90, 60, SRCCOPY)
End Sub
Private Sub Form_Load()
Timer1.Interval = 40
End Sub
Private Sub Timer1_Timer()
Call zoom
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -