⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmdatesel.frm

📁 vb与access数据库的操作实例
💻 FRM
字号:
VERSION 5.00
Object = "{8E27C92E-1264-101C-8A2F-040224009C02}#7.0#0"; "MSCAL.OCX"
Begin VB.Form FrmDateSel 
   BorderStyle     =   1  'Fixed Single
   ClientHeight    =   3915
   ClientLeft      =   15
   ClientTop       =   15
   ClientWidth     =   5430
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3915
   ScaleWidth      =   5430
   StartUpPosition =   3  '窗口缺省
   Begin MSACAL.Calendar Calendar1 
      Height          =   3375
      Left            =   120
      TabIndex        =   0
      Top             =   480
      Width           =   5175
      _Version        =   524288
      _ExtentX        =   9128
      _ExtentY        =   5953
      _StockProps     =   1
      BackColor       =   -2147483633
      Year            =   2002
      Month           =   9
      Day             =   15
      DayLength       =   0
      MonthLength     =   0
      DayFontColor    =   0
      FirstDay        =   1
      GridCellEffect  =   1
      GridFontColor   =   10485760
      GridLinesColor  =   -2147483632
      ShowDateSelectors=   -1  'True
      ShowDays        =   -1  'True
      ShowHorizontalGrid=   -1  'True
      ShowTitle       =   -1  'True
      ShowVerticalGrid=   -1  'True
      TitleFontColor  =   10485760
      ValueIsNull     =   0   'False
      BeginProperty DayFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty GridFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty TitleFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin VB.Image ImageCancel 
      Height          =   180
      Left            =   5040
      MouseIcon       =   "FrmDateSel.frx":0000
      MousePointer    =   99  'Custom
      Picture         =   "FrmDateSel.frx":030A
      Stretch         =   -1  'True
      Top             =   120
      Width           =   300
   End
   Begin VB.Image ImageOk 
      Height          =   180
      Left            =   4560
      MouseIcon       =   "FrmDateSel.frx":0440
      MousePointer    =   99  'Custom
      Picture         =   "FrmDateSel.frx":074A
      Stretch         =   -1  'True
      Top             =   120
      Width           =   300
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "请选择日期"
      Height          =   180
      Left            =   240
      TabIndex        =   1
      Top             =   120
      Width           =   900
   End
End
Attribute VB_Name = "FrmDateSel"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public OriDate As String '用来保存选择的日期
'初始化Calendar控件
Private Sub Form_Load()
  If IsDate(OriDate) = True Then
    Calendar1.Value = OriDate
  End If
End Sub

Private Sub ImageCancel_Click()
  Unload Me
End Sub
'设置选择日期到OriDate变量中
Private Sub ImageOk_Click()
  If Calendar1.Day = 0 Then
    MsgBox "请选择日期"
    Exit Sub
  End If
  OriDate = Format(Calendar1.Value, "yyyy-mm-dd")
  Unload Me
End Sub

⌨️ 快捷键说明

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