📄 form1.frm
字号:
End
Begin VB.Label Label2
BackColor = &H00404040&
Height = 375
Left = 120
TabIndex = 22
Top = 2640
Width = 375
End
Begin VB.Label Label1
BackColor = &H00FFFFFF&
Height = 375
Left = 240
TabIndex = 21
Top = 2760
Width = 375
End
End
Begin MSComctlLib.Toolbar tb
Align = 1 'Align Top
Height = 600
Left = 0
TabIndex = 4
Top = 0
Width = 11880
_ExtentX = 20955
_ExtentY = 1058
ButtonWidth = 1032
ButtonHeight = 1005
Appearance = 1
Style = 1
ImageList = "Img"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 5
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "topen"
Object.ToolTipText = "打开文件"
ImageIndex = 1
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Enabled = 0 'False
Key = "tlast"
Object.ToolTipText = "上一张"
ImageIndex = 2
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Enabled = 0 'False
Key = "tnext"
Object.ToolTipText = "下一张"
ImageIndex = 3
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Enabled = 0 'False
Key = "a"
Style = 3
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "cai"
Object.ToolTipText = "菜单"
ImageIndex = 5
Style = 5
BeginProperty ButtonMenus {66833FEC-8583-11D1-B16A-00C0F0283628}
NumButtonMenus = 3
BeginProperty ButtonMenu1 {66833FEE-8583-11D1-B16A-00C0F0283628}
Key = "aa"
Text = "aa"
EndProperty
BeginProperty ButtonMenu2 {66833FEE-8583-11D1-B16A-00C0F0283628}
Key = "bb"
Text = "bb"
EndProperty
BeginProperty ButtonMenu3 {66833FEE-8583-11D1-B16A-00C0F0283628}
Key = "cc"
Text = "cc"
EndProperty
EndProperty
EndProperty
EndProperty
BorderStyle = 1
End
Begin MSComDlg.CommonDialog CDl
Left = 6120
Top = 6000
_ExtentX = 847
_ExtentY = 847
_Version = 393216
Filter = "*.jpg"
End
Begin VB.PictureBox P1
Height = 7455
Left = 0
ScaleHeight = 7395
ScaleWidth = 9915
TabIndex = 0
Top = 600
Width = 9975
Begin VB.VScrollBar VS
Height = 7455
LargeChange = 10
Left = 9720
Max = 0
SmallChange = 5
TabIndex = 3
Top = 0
Visible = 0 'False
Width = 255
End
Begin VB.HScrollBar HS
Height = 255
Left = 0
Max = 0
TabIndex = 2
Top = 7200
Visible = 0 'False
Width = 9735
End
Begin VB.PictureBox P2
AutoRedraw = -1 'True
AutoSize = -1 'True
BackColor = &H00FFFFFF&
DrawMode = 1 'Blackness
Height = 7215
Left = 0
ScaleHeight = 7155
ScaleWidth = 9675
TabIndex = 1
Top = 0
Width = 9735
Begin RichTextLib.RichTextBox TextB
Height = 735
Left = 3240
TabIndex = 45
Top = 3120
Visible = 0 'False
Width = 1095
_ExtentX = 1931
_ExtentY = 1296
_Version = 393217
Enabled = -1 'True
TextRTF = $"Form1.frx":6ECE
End
Begin MSComctlLib.ImageList Img
Left = 2160
Top = 2400
_ExtentX = 1005
_ExtentY = 1005
BackColor = 8388608
ImageWidth = 32
ImageHeight = 32
MaskColor = 255
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 7
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":7158
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":75AC
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":7A00
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":7E54
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":8920
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":8C3C
Key = ""
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":B3F0
Key = ""
EndProperty
EndProperty
End
End
End
Begin VB.Menu MFILE
Caption = "文件"
Begin VB.Menu snew
Caption = "新建"
End
Begin VB.Menu SOPEN
Caption = "打开图片文件"
Shortcut = ^O
End
Begin VB.Menu ssave
Caption = "保存"
Shortcut = ^S
End
Begin VB.Menu sline1
Caption = "-"
End
Begin VB.Menu sfile
Caption = ""
Index = 0
Visible = 0 'False
End
Begin VB.Menu sline2
Caption = "-"
Visible = 0 'False
End
Begin VB.Menu SEXIT
Caption = "退出"
Shortcut = ^X
End
End
Begin VB.Menu MOPRATE
Caption = "操作"
Begin VB.Menu STOOL
Caption = "工具栏"
Begin VB.Menu SSTOOL
Caption = "颜色盒"
Checked = -1 'True
Index = 1
End
Begin VB.Menu SSTOOL
Caption = "线条"
Checked = -1 'True
Index = 2
End
Begin VB.Menu SSTOOL
Caption = "填充"
Checked = -1 'True
Index = 3
End
Begin VB.Menu SSTOOL
Caption = "字体格式"
Checked = -1 'True
Index = 4
End
Begin VB.Menu SSTOOL
Caption = "画图工具"
Checked = -1 'True
Index = 5
End
End
Begin VB.Menu SLAST
Caption = "上一张"
Enabled = 0 'False
Shortcut = ^L
End
Begin VB.Menu SNEXT
Caption = "下一张"
Enabled = 0 'False
Shortcut = ^N
End
Begin VB.Menu SXUAN
Caption = "旋转"
End
Begin VB.Menu SFAN
Caption = "反显"
End
Begin VB.Menu SBILI
Caption = "显示比例"
End
End
Begin VB.Menu Foperate
Caption = "操作员"
Visible = 0 'False
Begin VB.Menu SLAST1
Caption = "上一张"
Enabled = 0 'False
End
Begin VB.Menu SNEXT1
Caption = "下一张"
Enabled = 0 'False
End
Begin VB.Menu SXUAN1
Caption = "旋转"
End
Begin VB.Menu SFAN1
Caption = "反显"
End
Begin VB.Menu SBILI1
Caption = "显示比例"
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim hh, p, vv, x1, x2, xnew, ynew, y1, y2, rr, centerx, centery, what As Integer
Dim i, j, current, picturemode As Integer 'i:菜单中文件数目 current:当前文件编号
Dim fcolor, bcolor As Double
Dim rate As Single
Private Sub Checkxiao_Click(Index As Integer) '字体效果
Select Case Index
Case 0
If Checkxiao(0).value = 1 Then
TextB.SelItalic = True
Else
TextB.SelItalic = False
End If
Case 1
If Checkxiao(1) = 1 Then
TextB.SelBold = True
Else
TextB.SelBold = False
End If
Case 2
If Checkxiao(2).value = 1 Then
TextB.SelUnderline = True
Else
TextB.SelUnderline = False
End If
End Select
End Sub
Private Sub P2_Click() '把文本框的内容打印到图片上
Dim j As Integer
Dim cc As String
If what = 4 And Len(TextB.Text) <> 0 Then
TextB.Visible = False
P2.CurrentX = TextB.Left: P2.CurrentY = TextB.Top
For j = 0 To Len(TextB.Text) - 1
TextB.SelLength = 0
TextB.SelStart = j
TextB.SelLength = 1
With P2
.FontBold = TextB.SelBold
.FontItalic = TextB.SelItalic
.FontName = TextB.SelFontName
.FontSize = TextB.SelFontSize
.FontUnderline = TextB.SelUnderline
.ForeColor = TextB.SelColor
End With
P2.Print TextB.SelText;
Next
TextB.Text = ""
what = -1
End If
End Sub
Private Sub p2_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) '记下初始位置
If Button = 1 Then '定下初始位置
x1 = X
y1 = Y
x2 = X
y2 = Y
End If
If Button = 2 Then '判断是否按了右键
Form1.PopupMenu Foperate '弹出菜单
End If
End Sub
Private Sub p2_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
x2 = X
y2 = Y
Select Case what
Case 1
Call drawjuxing(13, picturemode)
Case 2
Call drawline(13)
Case 3
Call drawcircle(13, picturemode)
End Select
End Sub
Private Sub Command1_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then '颜色选择:左键前景
fcolor = QBColor(Index)
Label2.BackColor = QBColor(Index)
TextB.SelColor = QBColor(Index)
Else
bcolor = QBColor(Index) '右键背景
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -