📄 frminfo.frm
字号:
VERSION 5.00
Begin VB.Form frmInfo
Caption = "消息对话框"
ClientHeight = 4830
ClientLeft = 60
ClientTop = 345
ClientWidth = 7575
Icon = "frmInfo.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
ScaleHeight = 4830
ScaleWidth = 7575
Begin VB.PictureBox Picture1
BackColor = &H000000FF&
BorderStyle = 0 'None
Height = 675
Left = 6255
ScaleHeight = 675
ScaleWidth = 1275
TabIndex = 5
Top = 3915
Width = 1275
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "写回复内容"
ForeColor = &H0000FFFF&
Height = 180
Left = 225
TabIndex = 6
Top = 135
Width = 900
End
Begin VB.Line Line1
BorderColor = &H00FFFFFF&
X1 = -45
X2 = 750
Y1 = 495
Y2 = 495
End
Begin VB.Line Line2
BorderColor = &H00FFFFFF&
X1 = 750
X2 = 750
Y1 = 495
Y2 = 330
End
End
Begin VB.TextBox txtSend
ForeColor = &H00800000&
Height = 855
Left = 135
TabIndex = 0
Top = 3810
Width = 6075
End
Begin VB.CommandButton cmdClose
Cancel = -1 'True
Height = 435
Left = 6210
Picture = "frmInfo.frx":030A
Style = 1 'Graphical
TabIndex = 2
Top = 150
Width = 1185
End
Begin VB.CommandButton cmdReplay
Default = -1 'True
Enabled = 0 'False
Height = 435
Left = 4920
Picture = "frmInfo.frx":1A76
Style = 1 'Graphical
TabIndex = 1
Top = 150
Width = 1185
End
Begin VB.TextBox txtInfo
ForeColor = &H00008000&
Height = 2985
Left = 150
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 3
Text = "frmInfo.frx":31E2
Top = 720
Width = 7275
End
Begin VB.Line Line3
BorderColor = &H00FFFFFF&
Index = 1
X1 = 150
X2 = 7425
Y1 = 675
Y2 = 675
End
Begin VB.Line Line3
BorderColor = &H00808080&
Index = 0
X1 = 150
X2 = 7425
Y1 = 645
Y2 = 645
End
Begin VB.Label lblJH
BackStyle = 0 'Transparent
Caption = "号机发送来消息!"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000040C0&
Height = 240
Left = 195
TabIndex = 4
Top = 255
Width = 4230
End
Begin VB.Image Image1
Height = 1350
Left = 0
Picture = "frmInfo.frx":31F4
Top = 0
Visible = 0 'False
Width = 1350
End
End
Attribute VB_Name = "frmInfo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub cmdReplay_Click()
On Error GoTo Err_Replay
SM_TEXT = sendJH & "MESAGE" & txtSend
' 发送命令
frmServer.cmdSendData.Value = True
' 选定发送的内容
txtSend = ""
txtSend.SetFocus
Exit Sub
Err_Replay:
MsgBox "回复错误! " & vbCrLf & vbCrLf & Err.Description, vbCritical
End Sub
Private Sub Form_Activate()
txtSend.SetFocus
End Sub
Private Sub Form_Load()
FI = True
On Error Resume Next
Dim L As Long, T As Long, W As Long, H As Long
L = Val(GetSetting(App.EXEName, "Option", "Info_L", 2000))
T = Val(GetSetting(App.EXEName, "Option", "Info_T", 2000))
W = Val(GetSetting(App.EXEName, "Option", "Info_W", 5000))
H = Val(GetSetting(App.EXEName, "Option", "Info_H", 3000))
Me.left = L
Me.tOp = T
Me.Width = W
Me.Height = H
End Sub
Private Sub Form_Paint()
Dim intX As Integer
Dim intY As Integer
For intX = 0 To frmInfo.Width Step Image1.Width
For intY = 0 To frmInfo.Height Step (Image1.Height - 12)
PaintPicture Image1, intX, intY
Next intY
Next intX
End Sub
Private Sub Form_Resize()
On Error Resume Next
If Me.Width <= 5000 Then
Me.Width = 5000
End If '最小宽度
If Me.Height <= 3000 Then
Me.Height = 3000
End If
If Me.WindowState = 1 Then Exit Sub '最小化
cmdClose.left = Me.Width - cmdClose.Width - 260
cmdReplay.left = cmdClose.left - cmdReplay.Width - 100
Line3(0).X2 = Me.Width - 260
Line3(1).X2 = Me.Width - 260
txtInfo.Width = Me.Width - 400
txtInfo.Height = Me.Height * 0.45 '高为45%
txtSend.Width = Me.Width - 1800
txtSend.tOp = cmdReplay.Height + txtInfo.Height + 400
txtSend.Height = Me.Height - txtInfo.Height - 1400
Picture1.Height = txtSend.Height
Picture1.tOp = txtSend.tOp
Picture1.left = txtSend.Width + 200
Picture1.Width = txtInfo.Width - txtSend.Width
End Sub
Private Sub Form_Unload(Cancel As Integer)
FI = False
SaveSetting App.EXEName, "Option", "Info_L", Me.left
SaveSetting App.EXEName, "Option", "Info_T", Me.tOp
SaveSetting App.EXEName, "Option", "Info_W", Me.Width
SaveSetting App.EXEName, "Option", "Info_H", Me.Height
End Sub
Private Sub txtSend_Change()
If txtSend <> "" Then
cmdReplay.Enabled = True
Else
cmdReplay.Enabled = False
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -