📄 frmzktq.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmzktq
BorderStyle = 3 'Fixed Dialog
Caption = "LCD点阵提取"
ClientHeight = 4485
ClientLeft = 45
ClientTop = 330
ClientWidth = 6720
Icon = "frmzktq.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "frmzktq.frx":08CA
ScaleHeight = 299
ScaleMode = 3 'Pixel
ScaleWidth = 448
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox AscText
Height = 270
Left = 120
TabIndex = 17
Top = 3120
Width = 6495
End
Begin MSComctlLib.ProgressBar ProgressBar1
DragMode = 1 'Automatic
Height = 150
Left = 0
TabIndex = 15
Top = 2085
Visible = 0 'False
Width = 6720
_ExtentX = 11853
_ExtentY = 265
_Version = 393216
Appearance = 1
Max = 111
End
Begin VB.ComboBox ComboSY
Height = 300
Left = 4290
Style = 2 'Dropdown List
TabIndex = 4
Top = 2640
Width = 975
End
Begin VB.CommandButton CmdFont
Caption = "设置字体"
Height = 735
Left = 5400
Picture = "frmzktq.frx":7BFC
Style = 1 'Graphical
TabIndex = 5
Top = 2280
Width = 1215
End
Begin VB.CommandButton CmdSignel
Caption = "单个点阵库"
Height = 855
Left = 1440
Picture = "frmzktq.frx":7F06
Style = 1 'Graphical
TabIndex = 3
Top = 3480
Width = 1215
End
Begin VB.CommandButton CmdSave
Caption = "保存点阵库"
Height = 855
Left = 120
Picture = "frmzktq.frx":8348
Style = 1 'Graphical
TabIndex = 7
Top = 3480
Width = 1215
End
Begin VB.CommandButton Cmdexit
Caption = "退 出"
Height = 855
Left = 5400
Picture = "frmzktq.frx":878A
Style = 1 'Graphical
TabIndex = 8
Top = 3480
Width = 1215
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 5040
Top = 600
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.CommandButton CmdBitmap
Caption = "打开位图"
DownPicture = "frmzktq.frx":8BCC
Height = 855
Left = 2760
Picture = "frmzktq.frx":8ED6
Style = 1 'Graphical
TabIndex = 6
Top = 3480
Width = 1215
End
Begin VB.CommandButton CmdDisplay
Caption = "生成位图"
Height = 855
Left = 4080
Picture = "frmzktq.frx":91E0
Style = 1 'Graphical
TabIndex = 2
Top = 3480
Width = 1215
End
Begin VB.TextBox TxtLine2
Height = 270
Left = 840
MaxLength = 14
TabIndex = 1
Top = 2715
Width = 1425
End
Begin VB.PictureBox PictureDis
BackColor = &H8000000D&
Height = 600
Left = 2400
ScaleHeight = 36
ScaleMode = 3 'Pixel
ScaleWidth = 113
TabIndex = 10
Top = 2340
Width = 1755
Begin VB.Label Labtxt
BackStyle = 0 'Transparent
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 480
Left = 0
TabIndex = 13
Top = 0
Width = 1710
End
End
Begin VB.TextBox TxtLine1
Height = 270
Left = 840
MaxLength = 14
TabIndex = 0
Top = 2280
Width = 1425
End
Begin VB.PictureBox PictureRev
AutoRedraw = -1 'True
BackColor = &H80000007&
Height = 1950
Left = 0
ScaleHeight = 129.231
ScaleMode = 0 'User
ScaleWidth = 448.678
TabIndex = 9
Top = 120
Width = 6735
End
Begin VB.Label Label3
Alignment = 2 'Center
BackStyle = 0 'Transparent
BorderStyle = 1 'Fixed Single
Caption = "关 于"
ForeColor = &H000000FF&
Height = 255
Left = 120
TabIndex = 16
Top = 3120
Width = 6495
End
Begin VB.Label Label4
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "分割式样"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 4350
TabIndex = 14
Top = 2355
Width = 855
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "第一行:"
Height = 255
Left = 120
TabIndex = 12
Top = 2775
Width = 735
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "第一行:"
Height = 255
Left = 120
TabIndex = 11
Top = 2310
Width = 735
End
End
Attribute VB_Name = "frmzktq"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub AscText_Change()
str = AscText.Text
Labtxt = str
ComboSY.Text = "8X6"
End Sub
Private Sub CmdBitmap_Click()
On Error GoTo CmdBitmapErr
PictureDis.Picture = LoadPicture
CommonDialog1.Filter = "all file(*.*)|*.*|picture file (*.bmp,*.jpg,*.gif)|*.bmp;*.jpg;*.gif|Icon file (*.ico)|*.ico"
CommonDialog1.FilterIndex = 2
CommonDialog1.ShowOpen
If CommonDialog1.FileName = "" Then Exit Sub
PictureDis.Picture = LoadPicture(CommonDialog1.FileName)
Exit Sub
CmdBitmapErr:
MsgBox CommonDialog1.FileName & "文件打开错误", vbQuestion, "LCD液晶点阵图形错误"
End Sub
Private Sub CreatLib()
On Error GoTo CreatLibErr
Dim pixel As Long
Dim n1 As Byte
Dim red As Byte
n1 = 0
For XX = 0 To 111
For j = 0 To 3
For i = 7 To 0 Step -1
YY = j * 8 + i
pixel = PictureDis.Point(XX, YY)
red = pixel Mod 256
If red > 128 Then
n1 = n1 * 2 + 1
Else
n1 = n1 * 2
End If
Next i
DotLib(XX, j) = n1
n1 = 0
Next j
Next XX
Exit Sub
CreatLibErr:
MsgBox "错误", vbExclamation
End Sub
Private Sub DisplayBig()
On Error GoTo DisplayBigErr
Dim red As Byte
Dim n1 As Byte
ProgressBar1.Visible = True
Label3.Caption = "正在处理位图,请等候…… "
For XX = 0 To 111
ProgressBar1.Value = XX
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -