BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 7.8
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
FrameStyle = 1
FrameColor = 8421504
GradientColor = 16777215
GradientStyle = 4
GridColor = 12632256
GridStyle = 2
LabelBackStyle = 0
LabelBorderStyle= 0
LabelFontBold = -1 'True
LabelForeColor = 8388736
ShowInfoBar = 1
ShowNavigationBar= 1
WeekDayViewChar = 2
WeekNumberForeColor= 12582912
End
Begin VB.Frame fraSettings
Caption = "Some Settings"
BeginProperty Font
Name = "MS Sans Serif"
Size = 7.8
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800080&
Height = 4572
Left = 4920
TabIndex = 3
Top = 0
Width = 4932
Begin VB.CheckBox chkOptions
Alignment = 1 'Right Justify
Caption = "ShowToolTipText:"
ForeColor = &H00C00000&
Height = 252
Index = 3
Left = 120
TabIndex = 23
Top = 4200
Width = 4692
End
Begin VB.ComboBox cmbGrid
ForeColor = &H00800080&
Height = 288
ItemData = "frmDemoM.frx":0000
Left = 120
List = "frmDemoM.frx":0013
Style = 2 'Dropdown List
TabIndex = 14
Top = 2280
Width = 2292
End
Begin VB.CheckBox chkOptions
Alignment = 1 'Right Justify
Caption = "ShowNavigationBar:"
ForeColor = &H00C00000&
Height = 252
Index = 0
Left = 120
TabIndex = 13
Top = 3120
Width = 4692
End
Begin VB.CheckBox chkOptions
Alignment = 1 'Right Justify
Caption = "ShowInfoBar:"
ForeColor = &H00C00000&
Height = 252
Index = 1
Left = 120
TabIndex = 12
Top = 3480
Width = 4692
End
Begin VB.CheckBox chkOptions
Alignment = 1 'Right Justify
Caption = "ShowOtherMonths:"
ForeColor = &H00C00000&
Height = 252
Index = 2
Left = 120
TabIndex = 11
Top = 3840
Width = 4692
End
Begin VB.ComboBox cmbGradient
ForeColor = &H00800080&
Height = 288
ItemData = "frmDemoM.frx":004A
Left = 120
List = "frmDemoM.frx":005D
Style = 2 'Dropdown List
TabIndex = 10
Top = 1080
Width = 2292
End
Begin VB.ComboBox cmbButtonGradient
ForeColor = &H00800080&
Height = 288
ItemData = "frmDemoM.frx":009D
Left = 120
List = "frmDemoM.frx":00B0
Style = 2 'Dropdown List
TabIndex = 9
Top = 480
Width = 2292
End
Begin VB.ComboBox cmbLanguage
ForeColor = &H00800080&
Height = 288
ItemData = "frmDemoM.frx":00F0
Left = 2520
List = "frmDemoM.frx":0106
Style = 2 'Dropdown List
TabIndex = 8
Top = 480
Width = 2292
End
Begin VB.ComboBox cmbFrame
ForeColor = &H00800080&
Height = 288
ItemData = "frmDemoM.frx":013C
Left = 120
List = "frmDemoM.frx":0149
Style = 2 'Dropdown List
TabIndex = 7
Top = 1680
Width = 2292
End
Begin VB.ComboBox cmbWeekDay
ForeColor = &H00800080&
Height = 288
ItemData = "frmDemoM.frx":0160
Left = 2520
List = "frmDemoM.frx":0162
Style = 2 'Dropdown List
TabIndex = 6
Top = 1080
Width = 2292
End
Begin VB.ComboBox cmbDateFormat
ForeColor = &H00800080&
Height = 288
ItemData = "frmDemoM.frx":0164
Left = 2520
List = "frmDemoM.frx":0171
Style = 2 'Dropdown List
TabIndex = 5
Top = 1680
Width = 2292
End
Begin VB.ComboBox cmbHemisphere
ForeColor = &H00800080&
Height = 288
ItemData = "frmDemoM.frx":0199
Left = 2520
List = "frmDemoM.frx":01A3
Style = 2 'Dropdown List
TabIndex = 4
Top = 2280
Width = 2292
End
Begin VB.Label lblSetting
AutoSize = -1 'True
Caption = "GridStyle:"
ForeColor = &H00C00000&
Height = 192
Index = 2
Left = 120
TabIndex = 22
Top = 2040
Width = 696
End
Begin VB.Label lblSetting
AutoSize = -1 'True
Caption = "GradientType:"
ForeColor = &H00C00000&
Height = 192
Index = 1
Left = 120
TabIndex = 21
Top = 840
Width = 1032
End
Begin VB.Label lblSetting
AutoSize = -1 'True
Caption = "ButtonGradientType:"
ForeColor = &H00C00000&
Height = 192
Index = 0
Left = 120
TabIndex = 20
Top = 240
Width = 1476
End
Begin VB.Label lblSetting
AutoSize = -1 'True
Caption = "Language:"
ForeColor = &H00C00000&
Height = 312
Index = 3
Left = 2520
TabIndex = 19
Top = 240
Width = 768
End
Begin VB.Label lblSetting
AutoSize = -1 'True
Caption = "FrameStyle:"
ForeColor = &H00C00000&
Height = 192
Index = 4
Left = 120
TabIndex = 18
Top = 1440
Width = 864
End
Begin VB.Label lblSetting
AutoSize = -1 'True
Caption = "FirstWeekDay:"
ForeColor = &H00C00000&
Height = 192
Index = 5
Left = 2520
TabIndex = 17
Top = 840
Width = 1068
End
Begin VB.Label lblSetting
AutoSize = -1 'True
Caption = "DateFormat:"
ForeColor = &H00C00000&
Height = 192
Index = 6
Left = 2520
TabIndex = 16
Top = 1440
Width = 888
End
Begin VB.Label lblSetting
AutoSize = -1 'True
Caption = "Hemisphere:"
ForeColor = &H00C00000&
Height = 192
Index = 7
Left = 2520
TabIndex = 15
Top = 2040
Width = 924
End
Begin VB.Image imgLine
BorderStyle = 1 'Fixed Single
Height = 12
Left = 120
Top = 2880
Width = 4692
End
End
Begin VB.ComboBox cmbMonth
ForeColor = &H00800080&
Height = 288
Left = 1320
Style = 2 'Dropdown List
TabIndex = 2
Top = 45
Width = 1092
End
Begin VB.ComboBox cmbYear
ForeColor = &H00800080&
Height = 288
Left = 90
Style = 2 'Dropdown List
TabIndex = 1
Top = 45
Width = 960
End
Begin VB.Image imgBorder
BorderStyle = 1 'Fixed Single
Height = 4116
Left = 96
Top = 456
Width = 4620
End
Begin VB.Label lblDate
Alignment = 1 'Right Justify
AutoSize = -1 'True
Caption = "lblDate"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.6
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 240
Left = 3960
TabIndex = 0
Top = 120
Width = 732
End
Begin VB.Menu mnuMarkings
Caption = "Markings"
Visible = 0 'False
Begin VB.Menu mnuMark
Caption = "Mark"
Begin VB.Menu mnuMarkType
Caption = "Type 1"
Index = 0
End
Begin VB.Menu mnuMarkType
Caption = "Type 2"
Index = 1
End
Begin VB.Menu mnuMarkType
Caption = "Type 3"
Index = 2
End
Begin VB.Menu mnuMarkType
Caption = "Type 4"
Index = 3
End
Begin VB.Menu mnuMarkType
Caption = "Type 5"
Index = 4
End
End
Begin VB.Menu mnuDemark
Caption = "Demark"
Begin VB.Menu mnuDemarkType
Caption = "Type 1"
Index = 0
End
Begin VB.Menu mnuDemarkType
Caption = "Type 2"
Index = 1
End
Begin VB.Menu mnuDemarkType
Caption = "Type 3"
Index = 2
End
Begin VB.Menu mnuDemarkType
Caption = "Type 4"
Index = 3
End
Begin VB.Menu mnuDemarkType
Caption = "Type 5"
Index = 4
End
End
End
End
Attribute VB_Name = "frmDemoM"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Demo program for Calendar Control
'
'Author Ben Vonk
'20-08-2004 First version
'29-10-2005 Second version (based on Stefaan Casier's 'Owner Drawn Calendar Control' at http://www.codeguru.com/vb/controls/vb_othctrl/ocxcontrols/article.php/c1521/)
' This example demonstrates how Calendar control can be used.
' It shows how to (de)mark only selected calendar days, using a popup menu.
' The marking-changes you make in this demo are not stored.
Option Explicit
' in case you want to detect changes elsewhere
Dim Changes As Boolean ' not really used in this program
Private Sub DoMarkers(ByVal Index As Integer, ByVal Status As Boolean)
Dim intDay As Integer
With calDemo
For intDay = 1 To .GetMonthDays
' day, type, on/off
' here comes code that changes your data
If .IsDaySel(intDay) Then Call .DayMarking(intDay, Index, Status)