📄 modpublic.bas
字号:
Attribute VB_Name = "modPublic"
Option Explicit
Public Declare Function DrawIconEx Lib "user32" (ByVal hDC As Long, ByVal xLeft As Long, ByVal yTop As Long, ByVal hIcon As Long, ByVal cxWidth As Long, ByVal cyWidth As Long, ByVal istepIfAniCur As Long, ByVal hbrFlickerFreeDraw As Long, ByVal diFlags As Long) As Long
Public Declare Function DrawText Lib "user32" Alias "DrawTextA" (ByVal hDC As Long, ByVal lpStr As String, ByVal nCount As Long, lpRect As RECT, ByVal wFormat As Long) As Long
Public Declare Function SetRect Lib "user32" (lpRect As RECT, ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Long
Public Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Public Const DI_NORMAL = &H3
Public Const DT_SINGLELINE = &H20
Public Const DT_VCENTER = &H4
Public Const DT_CALCRECT = &H400
Public Function ShowPageSetup(Grid As FlexCell.Grid)
Load frmPageSetup
frmPageSetup.SetGrid Grid
frmPageSetup.Show vbModal
End Function
Public Function GetTextWidth(ByVal hDC As Long, ByVal Text As String) As Long
Dim rc As RECT
DrawText hDC, Text, -1, rc, DT_SINGLELINE Or DT_CALCRECT
GetTextWidth = rc.Right
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -