📄 文本框的消息处理二.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "读取鼠标所在位置的单词"
ClientHeight = 2355
ClientLeft = 60
ClientTop = 345
ClientWidth = 5160
LinkTopic = "Form1"
ScaleHeight = 157
ScaleMode = 3 'Pixel
ScaleWidth = 344
StartUpPosition = 3 'Windows Default
Begin VB.TextBox Text1
BeginProperty Font
Name = "MS Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1815
Left = 240
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 0
Text = "文本框的消息处理二.frx":0000
Top = 240
Width = 4695
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 Sub Text1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim pos As Long, lc As Long
Dim Line As Integer, CharPos As Integer
pos = X / Screen.TwipsPerPixelX + Y / Screen.TwipsPerPixelY * 65536
lc = SendMessage(Text1.hwnd, EM_CHARFROMPOS, 0, ByVal pos)
Line = lc \ 65536
CharPos = lc Mod 65536
MsgBox "
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -