📄 bobonbob.frm
字号:
VERSION 5.00
Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
Begin VB.Form BobOnBob
BackColor = &H00FFFFFF&
BorderStyle = 3 'Fixed Dialog
Caption = "Bob on Bob"
ClientHeight = 3525
ClientLeft = 45
ClientTop = 330
ClientWidth = 7410
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3525
ScaleWidth = 7410
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command1
Caption = "Start/Stop"
Height = 405
Left = 2160
TabIndex = 3
Top = 3090
Width = 3315
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 2000
Left = 1080
Top = 120
End
Begin RichTextLib.RichTextBox Area
Height = 2895
Left = 2160
TabIndex = 2
Top = 120
Width = 3285
_ExtentX = 5794
_ExtentY = 5106
_Version = 393217
BorderStyle = 0
Appearance = 0
TextRTF = $"BobOnBob.frx":0000
End
Begin VB.PictureBox Picture2
Appearance = 0 'Flat
BackColor = &H80000005&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 3075
Left = 5490
Picture = "BobOnBob.frx":008B
ScaleHeight = 3075
ScaleWidth = 1755
TabIndex = 1
Top = 420
Width = 1755
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
BackColor = &H80000005&
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 3315
Left = 30
Picture = "BobOnBob.frx":1008
ScaleHeight = 3315
ScaleWidth = 2085
TabIndex = 0
Top = 540
Width = 2085
End
End
Attribute VB_Name = "BobonBob"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim Bob1 As Boolean
Dim Last As String
Private Sub Command1_Click()
Timer1.Enabled = Not Timer1.Enabled
End Sub
Private Sub Form_Load()
Timer1.Enabled = True
ModFunctions.Username = "Bob"
Last = "Hello Bob2"
Bob1 = False
Area.Text = ""
AddColoredText "[Bob1]: " & Last, vbBlue, Area
End Sub
Sub AddColoredText(sText As String, sColor As ColorConstants, sTarget As RichTextBox)
Dim sLength As Long
sLength = Len(sTarget.Text)
sTarget.SelStart = sLength
sTarget.SelText = Chr(13) & Chr(10) & sText
sTarget.SelStart = sLength
sTarget.SelLength = Len(sTarget.Text) - sLength
sTarget.SelColor = sColor
sTarget.SelStart = Len(sTarget.Text)
End Sub
Private Sub Timer1_Timer()
If Len(Area.Text) > 40000 Then Area.Text = ""
If Bob1 = True Then
Last = Reply.GetKeywordReply(Last).sReply
AddColoredText "[Bob1]: " & Last, vbBlue, Area
Else
Last = Reply.GetKeywordReply(Last).sReply
AddColoredText "[Bob2]: " & Last, vbRed, Area
End If
Bob1 = Not Bob1
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -