frmcommonselectdateinput.frm

来自「通用书店管理系统」· FRM 代码 · 共 132 行

FRM
132
字号
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmCommonSelectDateInput 
   BackColor       =   &H00FFC0C0&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "日期范围输入"
   ClientHeight    =   2610
   ClientLeft      =   2790
   ClientTop       =   3915
   ClientWidth     =   4740
   FillStyle       =   0  'Solid
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2610
   ScaleWidth      =   4740
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton cmdOk 
      Height          =   495
      Left            =   960
      Picture         =   "frmCommonSelectDateInput.frx":0000
      Style           =   1  'Graphical
      TabIndex        =   6
      Top             =   1920
      Width           =   975
   End
   Begin VB.CommandButton cmdCancel 
      Height          =   495
      Left            =   2880
      Picture         =   "frmCommonSelectDateInput.frx":14E4
      Style           =   1  'Graphical
      TabIndex        =   5
      Top             =   1920
      Width           =   945
   End
   Begin VB.Frame fraFrame 
      BackColor       =   &H00FFC0C0&
      Caption         =   "请输入日期范围"
      Height          =   1575
      Left            =   330
      TabIndex        =   2
      Top             =   240
      Width           =   3975
      Begin MSComCtl2.DTPicker dtpFields 
         Height          =   375
         Index           =   0
         Left            =   1980
         TabIndex        =   0
         Top             =   360
         Width           =   1695
         _ExtentX        =   2990
         _ExtentY        =   661
         _Version        =   393216
         CustomFormat    =   "yyyy-MM-dd"
         Format          =   58261507
         CurrentDate     =   36717
      End
      Begin MSComCtl2.DTPicker dtpFields 
         Height          =   375
         Index           =   1
         Left            =   1980
         TabIndex        =   1
         Top             =   900
         Width           =   1695
         _ExtentX        =   2990
         _ExtentY        =   661
         _Version        =   393216
         CustomFormat    =   "yyyy-MM-dd"
         Format          =   58261507
         CurrentDate     =   36717
      End
      Begin VB.Label lblFields 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "终止日期"
         Height          =   180
         Index           =   1
         Left            =   480
         TabIndex        =   4
         Top             =   1020
         Width           =   720
      End
      Begin VB.Label lblFields 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "起始日期"
         Height          =   180
         Index           =   0
         Left            =   480
         TabIndex        =   3
         Top             =   480
         Width           =   720
      End
   End
End
Attribute VB_Name = "frmCommonSelectDateInput"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Public blnOK As Boolean
Public DatBegin As Date
Public datEnd As Date

Private Sub cmdCancel_Click()
    Unload Me
End Sub

Private Sub cmdok_Click()
    DatBegin = Me.dtpFields(0).Value
    datEnd = Me.dtpFields(1).Value
    blnOK = True
    Unload Me
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    Select Case KeyCode
    Case vbKeyReturn
        KeyCode = 0
        SendKeys "{tab}"
    End Select
End Sub

Private Sub Form_Load()
    blnOK = False
    dtpFields(0).Value = Date
    dtpFields(1).Value = Date
End Sub

⌨️ 快捷键说明

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