📄 frmrecieveopt.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form frmReceiveOpt
BorderStyle = 4 'Fixed ToolWindow
Caption = "收到信息 (来自:%FROM%)"
ClientHeight = 2550
ClientLeft = 45
ClientTop = 285
ClientWidth = 4500
Icon = "frmRecieveOpt.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 170
ScaleMode = 3 'Pixel
ScaleWidth = 300
StartUpPosition = 2 '屏幕中心
Begin MSComDlg.CommonDialog cdgSave
Left = 3240
Top = 1680
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.CommandButton cmdCancel
Caption = "取消(&C)"
Height = 285
Left = 240
TabIndex = 5
Top = 2160
Width = 1095
End
Begin VB.CommandButton cmdSave
Caption = "另存为(&S)"
Default = -1 'True
Height = 285
Left = 1440
TabIndex = 4
Top = 2160
Width = 1215
End
Begin VB.Frame frmProperties
Appearance = 0 'Flat
BorderStyle = 0 'None
Caption = "File Properties"
ForeColor = &H80000008&
Height = 2175
Left = 120
TabIndex = 1
Top = 360
Width = 4335
Begin VB.TextBox txtComments
Appearance = 0 'Flat
BackColor = &H8000000E&
Height = 1335
Left = 120
Locked = -1 'True
MaxLength = 200
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 3
TabStop = 0 'False
Text = "frmRecieveOpt.frx":038A
Top = 360
Width = 4125
End
Begin VB.TextBox txtFileName
Appearance = 0 'Flat
BackColor = &H8000000E&
Height = 285
Left = 120
Locked = -1 'True
TabIndex = 2
TabStop = 0 'False
Text = "%FILENAME%"
Top = 0
Width = 4095
End
End
Begin VB.Label lblFrom
AutoSize = -1 'True
Caption = "%FROM% 试图向你发送文件 大小(%FILESIZE%)KB"
Height = 180
Left = 120
TabIndex = 0
Top = 120
Width = 3780
End
End
Attribute VB_Name = "frmReceiveOpt"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim MyID As Long
Public Function Prepare(ByVal id As Long)
MyID = id
With ftRcv(id)
lblFrom = .From & " 试图向你发送文件 大小:" & .FileSize
txtFileName = .FileName
txtComments = Trim(.Comment)
.frmReceive.Caption = "Receive File From " & .From
.frmReceive.lblInfo = .FileName & " from " & .From
End With
Me.Visible = True
End Function
Private Sub cmdCancel_Click()
ftRcv(MyID).frmReceive.wsReceive.SendData "DENIED"
DoEvents
Unload ftRcv(MyID).frmReceive
Unload Me
End Sub
Private Sub cmdSave_Click()
On Error GoTo ErrHandler
With cdgSave
.CancelError = True
.FileName = ftRcv(MyID).FileName
.DialogTitle = "另存为"
.Filter = "所有文件 (*.*)|*.*"
.Flags = cdlOFNOverwritePrompt
.ShowSave
End With
ftRcv(MyID).Destination = cdgSave.FileName
ftRcv(MyID).frmReceive.wsReceive.SendData "ACCEPT"
ftRcv(MyID).frmReceive.Visible = True
Unload Me
ErrHandler:
End Sub
Private Sub Form_Unload(Cancel As Integer)
Set ftRcv(MyID).frmRcOpt = Nothing
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -