console.frm
来自「不错的一个VB菜单设计 界面和功能都不错」· FRM 代码 · 共 111 行
FRM
111 行
VERSION 5.00
Object = "*\A..\SOURCE\FAST2003.vbp"
Begin VB.Form frmConsole
BorderStyle = 3 'Fixed Dialog
Caption = "FWConsole Demo"
ClientHeight = 2175
ClientLeft = 1095
ClientTop = 1500
ClientWidth = 6000
Icon = "Console.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
PaletteMode = 1 'UseZOrder
ScaleHeight = 2175
ScaleWidth = 6000
ShowInTaskbar = 0 'False
Begin VB.CommandButton cmdShell
Caption = "Shell Console.bat"
Height = 465
Left = 135
TabIndex = 4
Top = 1125
Width = 1800
End
Begin VB.CommandButton cmdOpen
Caption = "Open"
Height = 465
Left = 135
TabIndex = 3
Top = 105
Width = 1800
End
Begin VB.CommandButton cmdClose
Caption = "Close"
Height = 465
Left = 135
TabIndex = 2
Top = 615
Width = 1800
End
Begin VB.TextBox txtConsole
Height = 345
Left = 2040
TabIndex = 1
Text = "This text will appear"
Top = 1695
Width = 3810
End
Begin VB.CommandButton cmdOutput
Caption = "Send Text"
Height = 465
Left = 135
TabIndex = 0
Top = 1635
Width = 1800
End
Begin FLWSystem.FWConsole objConsole
Left = 5415
Top = 60
_ExtentX = 820
_ExtentY = 820
End
End
Attribute VB_Name = "frmConsole"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
cmdOpen.Enabled = True
cmdClose.Enabled = False
cmdOutput.Enabled = False
cmdShell.Enabled = False
End Sub
Private Sub cmdClose_Click()
Call objConsole.CloseConsole
cmdOpen.Enabled = True
cmdClose.Enabled = False
cmdOutput.Enabled = False
cmdShell.Enabled = False
End Sub
Private Sub cmdOutput_Click()
Call objConsole.SendText(txtConsole)
End Sub
Private Sub cmdOpen_Click()
If Not objConsole.OpenConsole Then
Call MsgBox("Errors opening the console")
Else
cmdOpen.Enabled = False
cmdClose.Enabled = True
cmdOutput.Enabled = True
cmdShell.Enabled = True
End If
End Sub
Private Sub cmdShell_Click()
If Not objConsole.IsOpen Then
Call MsgBox("Open a console before running the file", vbCritical)
Else
Shell """" & App.Path & "\console.bat""", vbNormalFocus
End If
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?