?? form1.frm
字號:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form Form1
Caption = "畫圖程序"
ClientHeight = 5805
ClientLeft = 165
ClientTop = 450
ClientWidth = 7335
LinkTopic = "Form1"
ScaleHeight = 5805
ScaleWidth = 7335
StartUpPosition = 2 'CenterScreen
Begin MSComctlLib.ImageList ImageList1
Left = 480
Top = 960
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 13
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":0000
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":03CB
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":08E4
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":0D98
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":13B7
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":1732
Key = ""
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":1A9A
Key = ""
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":1E7D
Key = ""
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":22C0
Key = ""
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":2611
Key = ""
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":29E5
Key = ""
EndProperty
BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":2D9E
Key = ""
EndProperty
BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Form1.frx":310B
Key = ""
EndProperty
EndProperty
End
Begin MSComctlLib.Toolbar Toolbar2
Align = 3 'Align Left
Height = 5130
Left = 0
TabIndex = 3
Top = 360
Width = 420
_ExtentX = 741
_ExtentY = 9049
ButtonWidth = 609
ButtonHeight = 582
Appearance = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 5
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "Black"
Object.ToolTipText = "黑色畫筆(默認)"
ImageIndex = 9
Style = 2
Value = 1
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "Red"
Object.ToolTipText = "紅色畫筆"
ImageIndex = 10
Style = 2
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "Green"
Object.ToolTipText = "綠色畫筆"
ImageIndex = 11
Style = 2
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "Blue"
Object.ToolTipText = "藍色畫筆"
ImageIndex = 12
Style = 2
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "Yellow"
Object.ToolTipText = "黃色畫筆"
ImageIndex = 13
Style = 2
EndProperty
EndProperty
End
Begin VB.PictureBox Picture1
BackColor = &H00FFFFFF&
Height = 4455
Left = 960
ScaleHeight = 4395
ScaleWidth = 5595
TabIndex = 0
Top = 720
Width = 5655
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 480
Top = 360
_ExtentX = 847
_ExtentY = 847
_Version = 393216
DefaultExt = "drw"
Filter = "圖形文件 (*.drw)|*.drw"
End
Begin MSComctlLib.StatusBar StatusBar1
Align = 2 'Align Bottom
Height = 315
Left = 0
TabIndex = 2
Top = 5490
Width = 7335
_ExtentX = 12938
_ExtentY = 556
Style = 1
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 1
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
EndProperty
EndProperty
End
Begin MSComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 360
Left = 0
TabIndex = 1
Top = 0
Width = 7335
_ExtentX = 12938
_ExtentY = 635
ButtonWidth = 609
ButtonHeight = 582
Appearance = 1
Style = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 10
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "New"
Object.ToolTipText = "新建"
ImageIndex = 1
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "Open"
Object.ToolTipText = "打開文件"
ImageIndex = 2
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "Save"
Object.ToolTipText = "保存文件"
ImageIndex = 3
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "Select"
Object.ToolTipText = "選擇修改(移動)圖元"
ImageIndex = 4
Style = 2
Value = 1
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "Line"
Object.ToolTipText = "繪制直線圖元"
ImageIndex = 5
Style = 2
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "Reg"
Object.ToolTipText = "繪制矩形圖元"
ImageIndex = 6
Style = 2
EndProperty
BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "Circle"
Object.ToolTipText = "繪制圓圖元"
ImageIndex = 7
Style = 2
EndProperty
BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628}
Enabled = 0 'False
Key = "Delete"
Object.ToolTipText = "刪除當前圖元"
ImageIndex = 8
EndProperty
EndProperty
End
Begin VB.Menu File
Caption = "文件(&F)"
Begin VB.Menu New
Caption = "新建"
End
Begin VB.Menu Open
Caption = "打開..."
End
Begin VB.Menu Save
Caption = "保存"
End
Begin VB.Menu SaveAs
Caption = "另存為..."
End
Begin VB.Menu Separate1
Caption = "-"
End
Begin VB.Menu Print
Caption = "打印..."
End
Begin VB.Menu Separate2
Caption = "-"
End
Begin VB.Menu Exit
Caption = "退出"
End
End
Begin VB.Menu Draw
Caption = "畫圖(&D)"
Begin VB.Menu Line
Caption = "直線"
End
Begin VB.Menu Rec
Caption = "矩形"
End
Begin VB.Menu Circle
Caption = "圓"
End
End
Begin VB.Menu Color
Caption = "顏色(&C)"
Begin VB.Menu Black
Caption = "黑色"
End
Begin VB.Menu Red
Caption = "紅色"
End
Begin VB.Menu Green
Caption = "綠色"
End
Begin VB.Menu Blue
Caption = "藍色"
End
Begin VB.Menu Yellow
Caption = "黃色"
End
End
Begin VB.Menu Help
Caption = "幫助(&H)"
Begin VB.Menu About
Caption = "關于 畫圖程序"
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim mObject As DrawObject
Dim CurrentObject As Object
Dim CurrentIndex As Long
Dim CurrentSel As Long
Dim CurrentColor As Long
Dim MoveMode As Long
Dim Moving As Boolean
Dim FileName As String
Dim Response As Integer
Private Sub About_Click()
'點擊About鍵發生
MsgBox "VB課程設計實例" + Chr$(13) + Chr$(10) + "——畫圖程序" + Chr$(13) + Chr$(10) + " 2001.12", 0, "電子郵件"
End Sub
Private Sub Black_Click()
ChangeColor vbBlack
Toolbar2.Buttons("Black").Value = tbrPressed
Toolbar2.Buttons("Red").Value = tbrUnpressed
Toolbar2.Buttons("Green").Value = tbrUnpressed
Toolbar2.Buttons("Blue").Value = tbrUnpressed
Toolbar2.Buttons("Yellow").Value = tbrUnpressed
End Sub
Private Sub Blue_Click()
ChangeColor vbBlue
Toolbar2.Buttons("Black").Value = tbrUnpressed
Toolbar2.Buttons("Red").Value = tbrUnpressed
Toolbar2.Buttons("Green").Value = tbrUnpressed
Toolbar2.Buttons("Blue").Value = tbrPressed
Toolbar2.Buttons("Yellow").Value = tbrUnpressed
End Sub
Private Sub Circle_Click()
CurrentSel = 3
Picture1.MousePointer = 2 '設置鼠標光標
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -