📄 frmmain.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 frmMain
Caption = "BasicPlus"
ClientHeight = 5865
ClientLeft = 3960
ClientTop = 2550
ClientWidth = 7605
Icon = "frmMain.frx":0000
LinkTopic = "Form1"
ScaleHeight = 5865
ScaleWidth = 7605
Begin VB.Timer Timer2
Interval = 50
Left = 6840
Top = 2160
End
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 615
Left = 5520
TabIndex = 3
Top = 4080
Visible = 0 'False
Width = 1215
End
Begin VB.Timer Timer1
Interval = 100
Left = 6240
Top = 2160
End
Begin MSComctlLib.Toolbar tbToolBar
Align = 1 'Align Top
Height = 390
Left = 0
TabIndex = 1
Top = 0
Width = 7605
_ExtentX = 13414
_ExtentY = 688
ButtonWidth = 609
ButtonHeight = 582
ImageList = "imlToolbarIcons"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 9
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "新建"
Object.ToolTipText = "新建"
ImageIndex = 1
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "打开"
Object.ToolTipText = "打开"
ImageIndex = 2
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "保存"
Object.ToolTipText = "保存"
ImageIndex = 4
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "运行"
Object.ToolTipText = "运行"
ImageIndex = 5
EndProperty
BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "调试"
ImageIndex = 3
EndProperty
EndProperty
End
Begin MSComctlLib.StatusBar sbStatusBar
Align = 2 'Align Bottom
Height = 270
Left = 0
TabIndex = 0
Top = 5595
Width = 7605
_ExtentX = 13414
_ExtentY = 476
SimpleText = "2"
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 3
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 1
Object.Width = 7832
Text = "状态"
TextSave = "状态"
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 6
AutoSize = 2
TextSave = "2006-12-22"
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 5
AutoSize = 2
TextSave = "16:56"
EndProperty
EndProperty
End
Begin MSComDlg.CommonDialog dlgCommonDialog
Left = 6360
Top = 1560
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin MSComctlLib.ImageList imlToolbarIcons
Left = 6240
Top = 2640
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 5
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":06EA
Key = "New"
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":07FC
Key = "Open"
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":090E
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":0D50
Key = "Save"
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":0E62
Key = "run"
EndProperty
EndProperty
End
Begin VB.TextBox txtSource
Appearance = 0 'Flat
BeginProperty Font
Name = "Verdana"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1695
Left = 1560
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 2
Top = 1680
Width = 2175
End
Begin VB.Menu mnuFile
Caption = "文件(&F)"
Begin VB.Menu mnuFileNew
Caption = "新建(&N)"
Shortcut = ^N
End
Begin VB.Menu mnuFileOpen
Caption = "打开(&O)..."
End
Begin VB.Menu mnuFileClose
Caption = "关闭(&C)"
End
Begin VB.Menu mnuFileBar0
Caption = "-"
End
Begin VB.Menu mnuFileSave
Caption = "保存(&S)"
Shortcut = ^S
End
Begin VB.Menu mnuFileSaveAs
Caption = "另存为(&A)..."
End
Begin VB.Menu mnuFileBar1
Caption = "-"
End
Begin VB.Menu mnuFileExit
Caption = "退出(&X)"
End
End
Begin VB.Menu mnuView
Caption = "视图(&V)"
Begin VB.Menu mnuViewToolbar
Caption = "工具栏(&T)"
Checked = -1 'True
End
Begin VB.Menu mnuViewStatusBar
Caption = "状态栏(&B)"
Checked = -1 'True
End
End
Begin VB.Menu mnuRun
Caption = "运行(&R)"
Begin VB.Menu mnuStart
Caption = "启动"
Shortcut = {F9}
End
Begin VB.Menu ffb
Caption = "-"
End
Begin VB.Menu mnuDebug
Caption = "调试"
Shortcut = {F8}
End
End
Begin VB.Menu mnuHelp
Caption = "帮助(&H)"
Begin VB.Menu mnuHelpContents
Caption = "目录(&C)"
End
Begin VB.Menu mnuHelpBar0
Caption = "-"
End
Begin VB.Menu mnuHelpAbout
Caption = "关于(&A) "
End
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function OSWinHelp% Lib "user32" Alias "WinHelpA" (ByVal hwnd&, ByVal HelpFile$, ByVal wCommand%, dwData As Any)
Private Sub Runit()
Dim cc As New clsCode
cc.Init txtSource.Text
globalSource = txtSource.Text
frmResult.Clear
frmResult.Show
BanClear
On Error Resume Next
frmResult.Caption = "程序运行中 - 控制台"
cc.Run
frmResult.Caption = "程序中止 - 控制台"
If Err.Number > 0 Then
MsgBox Err.Description & "(第" & ErrLine & "行)", vbCritical, "错误 " & Err.Number
Err.Clear
ts = Split(txtSource.Text, vbCrLf)
For i = 0 To UBound(ts)
If i = ErrLine - 1 Then
s2 = Len(ts(i))
Exit For
Else
s1 = s1 + Len(ts(i)) + 2
End If
Next
txtSource.SelStart = s1
txtSource.SelLength = s2
txtSource.SetFocus
SendMessage txtSource.hwnd, EM_SCROLLCARET, 0, 0
End If
End Sub
Private Sub Command1_Click()
Dim cp As New clsExpPlus
s = "not false"
'Debug.Print cp.exp(s)
Dim se As New clsSen
se.strText = s
While Not se.Eof
Debug.Print se.ReadWord
Wend
Exit Sub
End Sub
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
MsgBox KeyCode
End Sub
Private Sub Form_Load()
Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)
Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000)
Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 6500)
Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 6500)
Load frmResult
End Sub
Private Sub Form_Resize()
On Error Resume Next
With txtSource
.Top = 400
.Left = 50
.Width = Me.ScaleWidth - 40
.Height = Me.ScaleHeight - 680
End With
lbLine = ""
For i = 1 To 100
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -