home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 5 / MasteringVisualBasic5.iso / protview / demowinx / data.1 / CAL.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-10-31  |  4.7 KB  |  175 lines

  1. VERSION 4.00
  2. Begin VB.Form CalFrm 
  3.    Caption         =   "Calendar"
  4.    ClientHeight    =   1980
  5.    ClientLeft      =   2115
  6.    ClientTop       =   1395
  7.    ClientWidth     =   4335
  8.    Height          =   2385
  9.    Left            =   2055
  10.    LinkTopic       =   "Form3"
  11.    ScaleHeight     =   1980
  12.    ScaleWidth      =   4335
  13.    Top             =   1050
  14.    Width           =   4455
  15.    Begin VB.CommandButton Command2 
  16.       Caption         =   "Close"
  17.       Height          =   375
  18.       Left            =   120
  19.       TabIndex        =   7
  20.       Top             =   0
  21.       Visible         =   0   'False
  22.       Width           =   855
  23.    End
  24.    Begin VB.CommandButton Command1 
  25.       Caption         =   "Show Calendar"
  26.       Height          =   495
  27.       Left            =   2760
  28.       TabIndex        =   6
  29.       Top             =   240
  30.       Width           =   1455
  31.    End
  32.    Begin VB.OptionButton Option5 
  33.       Caption         =   "One Month"
  34.       Height          =   255
  35.       Left            =   240
  36.       TabIndex        =   5
  37.       Top             =   1560
  38.       Width           =   1215
  39.    End
  40.    Begin VB.OptionButton Option4 
  41.       Caption         =   "Three Months (Vertical)"
  42.       Height          =   255
  43.       Left            =   240
  44.       TabIndex        =   4
  45.       Top             =   1200
  46.       Width           =   2055
  47.    End
  48.    Begin VB.OptionButton Option3 
  49.       Caption         =   "Three Months (Horizontal)"
  50.       Height          =   255
  51.       Left            =   240
  52.       TabIndex        =   3
  53.       Top             =   840
  54.       Width           =   2175
  55.    End
  56.    Begin VB.OptionButton Option2 
  57.       Caption         =   "Six Months"
  58.       Height          =   255
  59.       Left            =   240
  60.       TabIndex        =   2
  61.       Top             =   480
  62.       Width           =   1095
  63.    End
  64.    Begin VB.OptionButton Option1 
  65.       Caption         =   "Full Year"
  66.       Height          =   255
  67.       Left            =   240
  68.       TabIndex        =   1
  69.       Top             =   120
  70.       Value           =   -1  'True
  71.       Width           =   1095
  72.    End
  73.    Begin VB.Label Label1 
  74.       Caption         =   "Double-click a date or select a date and click the Close button."
  75.       Height          =   375
  76.       Left            =   1080
  77.       TabIndex        =   8
  78.       Top             =   0
  79.       Visible         =   0   'False
  80.       Width           =   2295
  81.    End
  82.    Begin PVCalendarLib.PVCalendar Calendar1 
  83.       Height          =   7485
  84.       Left            =   120
  85.       TabIndex        =   0
  86.       Top             =   480
  87.       Visible         =   0   'False
  88.       Width           =   9540
  89.       _Version        =   65536
  90.       _ExtentX        =   16828
  91.       _ExtentY        =   13203
  92.       _StockProps     =   228
  93.       Appearance      =   1
  94.       Format          =   4
  95.       SundayColor     =   255
  96.    End
  97. Attribute VB_Name = "CalFrm"
  98. Attribute VB_Creatable = False
  99. Attribute VB_Exposed = False
  100. Private Sub Calendar1_DblClick()
  101. DateFrm.DateEdit1.value = Calendar1.value
  102. Unload CalFrm
  103. End Sub
  104. Private Sub Command1_Click()
  105. If (Option1.value) = True Then
  106.    Rem full year
  107.    Calendar1.Format = 4
  108.    CalFrm.Width = 9900
  109.    CalFrm.Height = 8500
  110. End If
  111. If (Option2.value) = True Then
  112.    Rem half year
  113.    Calendar1.Format = 3
  114.    CalFrm.Width = 9900
  115.    CalFrm.Height = 4800
  116. End If
  117. If (Option3.value) = True Then
  118.    Rem qtr year (horz)
  119.    Calendar1.Format = 1
  120.    CalFrm.Width = 9900
  121.    CalFrm.Height = 3000
  122. End If
  123. If (Option4.value) = True Then
  124.    Rem qtr year (vert)
  125.    Calendar1.Format = 2
  126.    CalFrm.Width = 3500
  127.    CalFrm.Height = 6700
  128. End If
  129. If (Option5.value) = True Then
  130.    Rem single month
  131.    Calendar1.Format = 0
  132.    CalFrm.Width = 3500
  133.    CalFrm.Height = 3000
  134. End If
  135. Command1.Visible = False
  136. Option1.Visible = False
  137. Option2.Visible = False
  138. Option3.Visible = False
  139. Option4.Visible = False
  140. Option5.Visible = False
  141. Calendar1.Visible = True
  142. Command2.Visible = True
  143. Label1.Visible = True
  144. End Sub
  145. Private Sub Command2_Click()
  146. DateFrm.DateEdit1.value = Calendar1.value
  147. Unload CalFrm
  148. End Sub
  149. Private Sub Form_Initialize()
  150. Calendar1.Format = 0
  151. Calendar1.value = DateFrm.DateEdit1.value
  152. Command1.Visible = True
  153. Option1.Visible = True
  154. Option2.Visible = True
  155. Option3.Visible = True
  156. Option4.Visible = True
  157. Option5.Visible = True
  158. Calendar1.Visible = False
  159. Command2.Visible = False
  160. Label1.Visible = False
  161. End Sub
  162. Private Sub Form_Load()
  163. Calendar1.Format = 0
  164. Calendar1.value = DateFrm.DateEdit1.value
  165. Command1.Visible = True
  166. Option1.Visible = True
  167. Option2.Visible = True
  168. Option3.Visible = True
  169. Option4.Visible = True
  170. Option5.Visible = True
  171. Calendar1.Visible = False
  172. Command2.Visible = False
  173. Label1.Visible = False
  174. End Sub
  175.