📄 dy_rq.frm
字号:
VERSION 5.00
Object = "{C932BA88-4374-101B-A56C-00AA003668DC}#1.1#0"; "MSMASK32.OCX"
Begin VB.Form dy_rq
ClientHeight = 1455
ClientLeft = 60
ClientTop = 60
ClientWidth = 3975
ControlBox = 0 'False
LinkTopic = "Form1"
LockControls = -1 'True
ScaleHeight = 1455
ScaleWidth = 3975
StartUpPosition = 3 'Windows Default
Begin MSMask.MaskEdBox m_dyrq
Height = 255
Left = 1920
TabIndex = 0
Top = 360
Width = 1215
_ExtentX = 2143
_ExtentY = 450
_Version = 327680
MaxLength = 10
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Mask = "####-##-##"
PromptChar = " "
End
Begin VB.Label MSG
AutoSize = -1 'True
BackColor = &H80000018&
ForeColor = &H00FF0000&
Height = 180
Left = 2400
TabIndex = 1
Top = 120
Width = 90
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H00C0FFFF&
Caption = "请输入打印日期:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 210
Left = 120
TabIndex = 2
Top = 360
Width = 1710
End
Begin VB.Label Label2
BackColor = &H80000018&
Height = 1455
Left = 0
TabIndex = 3
Top = 0
Width = 3975
End
End
Attribute VB_Name = "dy_rq"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim t_rq As String
Dim ret_tf As Boolean
Dim DY_RQ1 As Date
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyEscape Then
ret_tf = False
Unload Me
End If
End Sub
Private Sub Form_Load()
KeyPreview = True
m_dyrq.Text = Format(Date, "yyyy-mm-dd")
m_dyrq.SelLength = 11
End Sub
Private Sub m_dyrq_Change()
MSG.Caption = ""
End Sub
Private Sub m_dyrq_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
If Not m_dyrq.Text = " - - " Then
t_rq = date_cl(m_dyrq.Text)
If t_rq <> "F" Then
m_dyrq = t_rq
End If
If IsDate(m_dyrq.Text) Then
If CDate(m_dyrq.Text) <= Date Then
DY_RQ1 = CDate(m_dyrq.Text)
ret_tf = True
Unload Me
Else
MSG.Caption = "无效打印日期!"
m_dyrq.SelStart = 0
m_dyrq.SelLength = Len(Trim(m_dyrq.Text))
End If
Else
MSG.Caption = "无效打印日期!"
m_dyrq.SelStart = 0
m_dyrq.SelLength = Len(Trim(m_dyrq.Text))
End If
Else
ret_tf = False
Unload Me
yx_main.Show (1)
End If
End If
End Sub
Public Property Get tf() As Boolean
tf = ret_tf
End Property
Public Property Let tf(t_f As Boolean)
t_f = tf
End Property
Public Property Get rq() As Date
rq = DY_RQ1
End Property
Public Property Let rq(RQ1 As Date)
RQ1 = rq
End Property
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -