home *** CD-ROM | disk | FTP | other *** search
/ Using Visual Basic 5 (Platinum Edition) / vb5.iso / Code / ch12 / Frames.frm (.txt) next >
Encoding:
Visual Basic Form  |  1997-06-14  |  4.9 KB  |  158 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    Caption         =   "My Backyp Utility"
  4.    ClientHeight    =   3165
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   5895
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   3165
  10.    ScaleWidth      =   5895
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.Frame Frame1 
  13.       Caption         =   "Select day of month"
  14.       Height          =   1935
  15.       Index           =   2
  16.       Left            =   5760
  17.       TabIndex        =   10
  18.       Top             =   840
  19.       Width           =   2775
  20.       Begin VB.ComboBox cboDay 
  21.          Height          =   315
  22.          ItemData        =   "Frames.frx":0000
  23.          Left            =   480
  24.          List            =   "Frames.frx":0061
  25.          Style           =   2  'Dropdown List
  26.          TabIndex        =   11
  27.          Top             =   840
  28.          Width           =   1815
  29.       End
  30.    End
  31.    Begin VB.Frame Frame1 
  32.       Caption         =   "Select weekday"
  33.       Height          =   1935
  34.       Index           =   1
  35.       Left            =   2880
  36.       TabIndex        =   8
  37.       Top             =   2880
  38.       Width           =   2775
  39.       Begin VB.ComboBox cboWeekday 
  40.          Height          =   315
  41.          ItemData        =   "Frames.frx":00D8
  42.          Left            =   480
  43.          List            =   "Frames.frx":00F1
  44.          Style           =   2  'Dropdown List
  45.          TabIndex        =   9
  46.          Top             =   840
  47.          Width           =   1815
  48.       End
  49.    End
  50.    Begin VB.Frame Frame1 
  51.       Caption         =   "Select time "
  52.       Height          =   1935
  53.       Index           =   0
  54.       Left            =   2880
  55.       TabIndex        =   4
  56.       Top             =   840
  57.       Width           =   2775
  58.       Begin VB.OptionButton optTime 
  59.          Caption         =   "P.M."
  60.          Height          =   255
  61.          Index           =   1
  62.          Left            =   1560
  63.          TabIndex        =   7
  64.          Top             =   1320
  65.          Width           =   735
  66.       End
  67.       Begin VB.OptionButton optTime 
  68.          Caption         =   "A.M."
  69.          Height          =   255
  70.          Index           =   0
  71.          Left            =   480
  72.          TabIndex        =   6
  73.          Top             =   1320
  74.          Value           =   -1  'True
  75.          Width           =   735
  76.       End
  77.       Begin VB.ComboBox cboTime 
  78.          Height          =   315
  79.          ItemData        =   "Frames.frx":0135
  80.          Left            =   480
  81.          List            =   "Frames.frx":0181
  82.          TabIndex        =   5
  83.          Text            =   "Combo1"
  84.          Top             =   840
  85.          Width           =   1815
  86.       End
  87.    End
  88.    Begin VB.OptionButton optFrequency 
  89.       Caption         =   "Once a month"
  90.       Height          =   330
  91.       Index           =   2
  92.       Left            =   360
  93.       TabIndex        =   3
  94.       Top             =   2160
  95.       Width           =   2130
  96.    End
  97.    Begin VB.OptionButton optFrequency 
  98.       Caption         =   "Once a week"
  99.       Height          =   330
  100.       Index           =   1
  101.       Left            =   360
  102.       TabIndex        =   2
  103.       Top             =   1560
  104.       Width           =   2130
  105.    End
  106.    Begin VB.OptionButton optFrequency 
  107.       Caption         =   "Once a day"
  108.       Height          =   330
  109.       Index           =   0
  110.       Left            =   345
  111.       TabIndex        =   1
  112.       Top             =   960
  113.       Value           =   -1  'True
  114.       Width           =   2130
  115.    End
  116.    Begin VB.Label Label1 
  117.       Caption         =   "Please select the frequency of backup operations"
  118.       BeginProperty Font 
  119.          Name            =   "MS Sans Serif"
  120.          Size            =   12
  121.          Charset         =   0
  122.          Weight          =   400
  123.          Underline       =   0   'False
  124.          Italic          =   0   'False
  125.          Strikethrough   =   0   'False
  126.       EndProperty
  127.       Height          =   420
  128.       Left            =   240
  129.       TabIndex        =   0
  130.       Top             =   240
  131.       Width           =   6870
  132.    End
  133. Attribute VB_Name = "Form1"
  134. Attribute VB_GlobalNameSpace = False
  135. Attribute VB_Creatable = False
  136. Attribute VB_PredeclaredId = True
  137. Attribute VB_Exposed = False
  138. Option Explicit
  139. Private Sub Form_Load()
  140.     ' pile the Frames one over the other and make
  141.     ' them visible or invisible
  142.     Dim i As Integer
  143.     For i = 0 To 2
  144.         Frame1(i).Move Frame1(0).Left, Frame1(0).Top, Frame1(0).Width, Frame1(0).Height
  145.         Frame1(i).Visible = optFrequency(i).Value
  146.     Next
  147.     ' init combo boxes
  148.     cboTime.ListIndex = 0
  149.     cboWeekday.ListIndex = 0
  150.     cboDay.ListIndex = 0
  151. End Sub
  152. Private Sub optFrequency_Click(Index As Integer)
  153.     Dim i As Integer
  154.     For i = 0 To 2
  155.         Frame1(i).Visible = (Index = i)
  156.     Next
  157. End Sub
  158.