【VB开源代码栏目提醒】:网学会员--在 VB开源代码编辑为广大网友搜集整理了:FrmDateSel.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