⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmconsole.frm

📁 用VB实现的编译器的源代码
💻 FRM
字号:
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Begin VB.Form frmConsole 
   Caption         =   "B++ Console"
   ClientHeight    =   5535
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   9255
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmConsole.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   5535
   ScaleWidth      =   9255
   StartUpPosition =   3  'Windows-Standard
   Begin RichTextLib.RichTextBox txtConsole 
      Height          =   5295
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   9015
      _ExtentX        =   15901
      _ExtentY        =   9340
      _Version        =   393217
      BackColor       =   0
      Enabled         =   -1  'True
      TextRTF         =   $"frmConsole.frx":058A
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
End
Attribute VB_Name = "frmConsole"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Buffer As String
Public InputMode As Boolean

Private Sub Form_Load()
    Me.txtConsole.SelColor = vbWhite
End Sub

Private Sub Form_Resize()
    Me.txtConsole.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight
End Sub

Public Function GetLine()
    txtConsole.SelFontName = "Courier New"
    txtConsole.SelBold = False
    txtConsole.SelColor = vbYellow
    InputMode = True
    txtConsole.Locked = False
    InputMode = True
    Buffer = ""
    Do While InputMode
        DoEvents
        Sleep 10
    Loop
    txtConsole.Locked = True
    GetLine = Buffer
End Function

Public Sub Wipe()
    txtConsole.Text = ""
End Sub

Public Sub PutLine(Text As String)
    txtConsole.SelFontName = "Tahoma"
    txtConsole.SelBold = True
    txtConsole.SelColor = vbWhite
    txtConsole.SelText = Text
End Sub

Private Sub txtConsole_KeyPress(KeyAscii As Integer)
    If Me.txtConsole.Locked = True Then KeyAscii = 0: Exit Sub
    If KeyAscii = 8 Then
        Buffer = Left(Buffer, Len(Buffer) - 1)
        Exit Sub
    ElseIf KeyAscii = 13 Then
        KeyAscii = 0
        InputMode = False
        Exit Sub
    End If
    Buffer = Buffer & Chr(KeyAscii)
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -