home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / swbdate / testform.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-01-05  |  8.0 KB  |  256 lines

  1. VERSION 5.00
  2. Object = "{8E8A121A-1787-11D2-AD63-004005448951}#5.2#0"; "SWBDATE.OCX"
  3. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  4. Begin VB.Form Form1 
  5.    Caption         =   "SWBDateSelect Sample Application"
  6.    ClientHeight    =   4170
  7.    ClientLeft      =   60
  8.    ClientTop       =   345
  9.    ClientWidth     =   5895
  10.    ControlBox      =   0   'False
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   4170
  13.    ScaleWidth      =   5895
  14.    StartUpPosition =   3  'Windows Default
  15.    Begin SWBDateSel.SWBDateSelect SWBDateSelect1 
  16.       Height          =   330
  17.       Left            =   1125
  18.       TabIndex        =   16
  19.       Top             =   1260
  20.       Width           =   2895
  21.       _ExtentX        =   5106
  22.       _ExtentY        =   582
  23.       MaxLength       =   0
  24.       Text            =   ""
  25.       DateFormat      =   "Short Date"
  26.       DateValue       =   0
  27.       Enabled         =   -1  'True
  28.       ForeColor       =   -2147483640
  29.       BackColor       =   -2147483643
  30.    End
  31.    Begin MSComDlg.CommonDialog Dlg 
  32.       Left            =   4815
  33.       Top             =   630
  34.       _ExtentX        =   847
  35.       _ExtentY        =   847
  36.       _Version        =   393216
  37.    End
  38.    Begin VB.Frame Frame1 
  39.       Caption         =   "Options"
  40.       Height          =   2130
  41.       Left            =   225
  42.       TabIndex        =   6
  43.       Top             =   1890
  44.       Width           =   5415
  45.       Begin VB.ComboBox cboDateFmt 
  46.          Height          =   315
  47.          ItemData        =   "testform.frx":0000
  48.          Left            =   1260
  49.          List            =   "testform.frx":000D
  50.          TabIndex        =   20
  51.          Text            =   "Combo1"
  52.          Top             =   1575
  53.          Width           =   2220
  54.       End
  55.       Begin VB.CommandButton SetBtn 
  56.          Caption         =   "&Set"
  57.          Height          =   330
  58.          Left            =   3555
  59.          TabIndex        =   19
  60.          Top             =   1575
  61.          Width           =   690
  62.       End
  63.       Begin VB.TextBox FontSizeTxt 
  64.          BackColor       =   &H8000000F&
  65.          Height          =   285
  66.          Left            =   4590
  67.          Locked          =   -1  'True
  68.          TabIndex        =   17
  69.          Top             =   405
  70.          Width           =   330
  71.       End
  72.       Begin VB.HScrollBar HScroll1 
  73.          Height          =   240
  74.          LargeChange     =   2
  75.          Left            =   3870
  76.          Max             =   12
  77.          Min             =   8
  78.          SmallChange     =   2
  79.          TabIndex        =   13
  80.          Top             =   765
  81.          Value           =   8
  82.          Width           =   1005
  83.       End
  84.       Begin VB.CommandButton BackColorBtn 
  85.          Caption         =   "Set &BackColor..."
  86.          Height          =   375
  87.          Left            =   1845
  88.          TabIndex        =   11
  89.          Top             =   855
  90.          Width           =   1410
  91.       End
  92.       Begin VB.CommandButton ForeColorBtn 
  93.          Caption         =   "Set &ForeColor..."
  94.          Height          =   375
  95.          Left            =   1845
  96.          TabIndex        =   10
  97.          Top             =   405
  98.          Width           =   1410
  99.       End
  100.       Begin VB.CheckBox UnderlineChk 
  101.          Caption         =   "&Underline"
  102.          Height          =   285
  103.          Left            =   270
  104.          TabIndex        =   9
  105.          Top             =   990
  106.          Width           =   1365
  107.       End
  108.       Begin VB.CheckBox ItalicChk 
  109.          Caption         =   "&Italic"
  110.          Height          =   285
  111.          Left            =   270
  112.          TabIndex        =   8
  113.          Top             =   675
  114.          Width           =   1320
  115.       End
  116.       Begin VB.CheckBox BoldChk 
  117.          Caption         =   "&Bold"
  118.          Height          =   285
  119.          Left            =   270
  120.          TabIndex        =   7
  121.          Top             =   360
  122.          Width           =   1275
  123.       End
  124.       Begin VB.Label Label7 
  125.          AutoSize        =   -1  'True
  126.          Caption         =   "Date Format"
  127.          Height          =   195
  128.          Left            =   270
  129.          TabIndex        =   18
  130.          Top             =   1620
  131.          Width           =   870
  132.       End
  133.       Begin VB.Label Label6 
  134.          Caption         =   "12"
  135.          Height          =   195
  136.          Left            =   4680
  137.          TabIndex        =   15
  138.          Top             =   1080
  139.          Width           =   195
  140.       End
  141.       Begin VB.Label Label5 
  142.          Caption         =   "8"
  143.          Height          =   195
  144.          Left            =   3915
  145.          TabIndex        =   14
  146.          Top             =   1080
  147.          Width           =   195
  148.       End
  149.       Begin VB.Label Label4 
  150.          AutoSize        =   -1  'True
  151.          Caption         =   "Font Size:"
  152.          Height          =   195
  153.          Left            =   3825
  154.          TabIndex        =   12
  155.          Top             =   450
  156.          Width           =   705
  157.       End
  158.    End
  159.    Begin VB.CommandButton CloseBtn 
  160.       Caption         =   "&Close"
  161.       Height          =   375
  162.       Left            =   4590
  163.       TabIndex        =   2
  164.       Top             =   135
  165.       Width           =   1140
  166.    End
  167.    Begin VB.TextBox Text2 
  168.       Height          =   330
  169.       Left            =   1125
  170.       TabIndex        =   1
  171.       Top             =   765
  172.       Width           =   2850
  173.    End
  174.    Begin VB.TextBox Text1 
  175.       DataField       =   "Description"
  176.       DataSource      =   "Data1"
  177.       Height          =   330
  178.       Left            =   1125
  179.       TabIndex        =   0
  180.       Top             =   315
  181.       Width           =   2850
  182.    End
  183.    Begin VB.Label Label3 
  184.       AutoSize        =   -1  'True
  185.       Caption         =   "Title"
  186.       Height          =   195
  187.       Left            =   270
  188.       TabIndex        =   5
  189.       Top             =   810
  190.       Width           =   300
  191.    End
  192.    Begin VB.Label Label2 
  193.       AutoSize        =   -1  'True
  194.       Caption         =   "Birth Date"
  195.       Height          =   195
  196.       Left            =   270
  197.       TabIndex        =   4
  198.       Top             =   1260
  199.       Width           =   705
  200.    End
  201.    Begin VB.Label Label1 
  202.       AutoSize        =   -1  'True
  203.       Caption         =   "Name"
  204.       Height          =   195
  205.       Left            =   270
  206.       TabIndex        =   3
  207.       Top             =   405
  208.       Width           =   420
  209.    End
  210. Attribute VB_Name = "Form1"
  211. Attribute VB_GlobalNameSpace = False
  212. Attribute VB_Creatable = False
  213. Attribute VB_PredeclaredId = True
  214. Attribute VB_Exposed = False
  215. Option Explicit
  216. Private Sub BackColorBtn_Click()
  217.     On Error GoTo ExitSub
  218.     Dlg.CancelError = True
  219.     Dlg.Flags = cdlCCRGBInit
  220.     Dlg.ShowColor
  221.     SWBDateSelect1.BackColor = Dlg.Color
  222. ExitSub:
  223. End Sub
  224. Private Sub BoldChk_Click()
  225.     SWBDateSelect1.SetTextFont "MS Sans Serif", FontBold:=(BoldChk.Value = vbChecked)
  226. End Sub
  227. Private Sub CloseBtn_Click()
  228.     Unload Me
  229. End Sub
  230. Private Sub ForeColorBtn_Click()
  231.     On Error GoTo ExitSub
  232.     Dlg.CancelError = True
  233.     Dlg.Flags = cdlCCRGBInit
  234.     Dlg.ShowColor
  235.     SWBDateSelect1.ForeColor = Dlg.Color
  236. ExitSub:
  237. End Sub
  238. Private Sub Form_Load()
  239.     SWBDateSelect1.Enabled = True
  240.     cboDateFmt.Text = SWBDateSelect1.DateFormat
  241. End Sub
  242. Private Sub HScroll1_Change()
  243.     SWBDateSelect1.SetTextFont "MS Sans Serif", HScroll1.Value
  244.     FontSizeTxt.Text = CStr(HScroll1.Value)
  245. End Sub
  246. Private Sub ItalicChk_Click()
  247.     SWBDateSelect1.SetTextFont "MS Sans Serif", FontItalic:=(ItalicChk.Value = vbChecked)
  248. End Sub
  249. Private Sub SetBtn_Click()
  250.     SWBDateSelect1.DateFormat = cboDateFmt.Text
  251.     SWBDateSelect1.DateValue = SWBDateSelect1.DateValue
  252. End Sub
  253. Private Sub UnderlineChk_Click()
  254.     SWBDateSelect1.SetTextFont "MS Sans Serif", FontUnderline:=(UnderlineChk.Value = vbChecked)
  255. End Sub
  256.