📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3360
ClientLeft = 60
ClientTop = 345
ClientWidth = 4950
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 3360
ScaleWidth = 4950
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "点击按钮"
Height = 420
Left = 1710
TabIndex = 0
Top = 2640
Width = 1515
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 Const DST_TEXT = &H1
Private Const DSS_DISABLED = &H20
Private Declare Function DrawState Lib "user32" Alias "DrawStateA" _
(ByVal hDC As Long, ByVal hBrush As Long, ByVal _
lpDrawStateProc As Long, ByVal lParam As String, _
ByVal wParam As Long, ByVal n1 As Long, ByVal n2 As Long, _
ByVal n3 As Long, ByVal n4 As Long, ByVal un As Long) As Long
Private Sub Command1_Click()
Dim FontStr As String
FontStr = "华中理工大学Hust"
FontSize = 30
DrawState Me.hDC, 0, 0, FontStr, LenB(StrConv(FontStr, vbFromUnicode)), 10, 80, 0, 0, DST_TEXT Or DSS_DISABLED
Me.AutoRedraw = True
DrawState Me.hDC, 0, 0, FontStr, LenB(StrConv(FontStr, vbFromUnicode)), 10, 80, 0, 0, DST_TEXT Or DSS_DISABLED
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -