home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{8E8A121A-1787-11D2-AD63-004005448951}#5.2#0"; "SWBDATE.OCX"
- Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
- Begin VB.Form Form1
- Caption = "SWBDateSelect Sample Application"
- ClientHeight = 4170
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 5895
- ControlBox = 0 'False
- LinkTopic = "Form1"
- ScaleHeight = 4170
- ScaleWidth = 5895
- StartUpPosition = 3 'Windows Default
- Begin SWBDateSel.SWBDateSelect SWBDateSelect1
- Height = 330
- Left = 1125
- TabIndex = 16
- Top = 1260
- Width = 2895
- _ExtentX = 5106
- _ExtentY = 582
- MaxLength = 0
- Text = ""
- DateFormat = "Short Date"
- DateValue = 0
- Enabled = -1 'True
- ForeColor = -2147483640
- BackColor = -2147483643
- End
- Begin MSComDlg.CommonDialog Dlg
- Left = 4815
- Top = 630
- _ExtentX = 847
- _ExtentY = 847
- _Version = 393216
- End
- Begin VB.Frame Frame1
- Caption = "Options"
- Height = 2130
- Left = 225
- TabIndex = 6
- Top = 1890
- Width = 5415
- Begin VB.ComboBox cboDateFmt
- Height = 315
- ItemData = "testform.frx":0000
- Left = 1260
- List = "testform.frx":000D
- TabIndex = 20
- Text = "Combo1"
- Top = 1575
- Width = 2220
- End
- Begin VB.CommandButton SetBtn
- Caption = "&Set"
- Height = 330
- Left = 3555
- TabIndex = 19
- Top = 1575
- Width = 690
- End
- Begin VB.TextBox FontSizeTxt
- BackColor = &H8000000F&
- Height = 285
- Left = 4590
- Locked = -1 'True
- TabIndex = 17
- Top = 405
- Width = 330
- End
- Begin VB.HScrollBar HScroll1
- Height = 240
- LargeChange = 2
- Left = 3870
- Max = 12
- Min = 8
- SmallChange = 2
- TabIndex = 13
- Top = 765
- Value = 8
- Width = 1005
- End
- Begin VB.CommandButton BackColorBtn
- Caption = "Set &BackColor..."
- Height = 375
- Left = 1845
- TabIndex = 11
- Top = 855
- Width = 1410
- End
- Begin VB.CommandButton ForeColorBtn
- Caption = "Set &ForeColor..."
- Height = 375
- Left = 1845
- TabIndex = 10
- Top = 405
- Width = 1410
- End
- Begin VB.CheckBox UnderlineChk
- Caption = "&Underline"
- Height = 285
- Left = 270
- TabIndex = 9
- Top = 990
- Width = 1365
- End
- Begin VB.CheckBox ItalicChk
- Caption = "&Italic"
- Height = 285
- Left = 270
- TabIndex = 8
- Top = 675
- Width = 1320
- End
- Begin VB.CheckBox BoldChk
- Caption = "&Bold"
- Height = 285
- Left = 270
- TabIndex = 7
- Top = 360
- Width = 1275
- End
- Begin VB.Label Label7
- AutoSize = -1 'True
- Caption = "Date Format"
- Height = 195
- Left = 270
- TabIndex = 18
- Top = 1620
- Width = 870
- End
- Begin VB.Label Label6
- Caption = "12"
- Height = 195
- Left = 4680
- TabIndex = 15
- Top = 1080
- Width = 195
- End
- Begin VB.Label Label5
- Caption = "8"
- Height = 195
- Left = 3915
- TabIndex = 14
- Top = 1080
- Width = 195
- End
- Begin VB.Label Label4
- AutoSize = -1 'True
- Caption = "Font Size:"
- Height = 195
- Left = 3825
- TabIndex = 12
- Top = 450
- Width = 705
- End
- End
- Begin VB.CommandButton CloseBtn
- Caption = "&Close"
- Height = 375
- Left = 4590
- TabIndex = 2
- Top = 135
- Width = 1140
- End
- Begin VB.TextBox Text2
- Height = 330
- Left = 1125
- TabIndex = 1
- Top = 765
- Width = 2850
- End
- Begin VB.TextBox Text1
- DataField = "Description"
- DataSource = "Data1"
- Height = 330
- Left = 1125
- TabIndex = 0
- Top = 315
- Width = 2850
- End
- Begin VB.Label Label3
- AutoSize = -1 'True
- Caption = "Title"
- Height = 195
- Left = 270
- TabIndex = 5
- Top = 810
- Width = 300
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "Birth Date"
- Height = 195
- Left = 270
- TabIndex = 4
- Top = 1260
- Width = 705
- End
- Begin VB.Label Label1
- AutoSize = -1 'True
- Caption = "Name"
- Height = 195
- Left = 270
- TabIndex = 3
- Top = 405
- Width = 420
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub BackColorBtn_Click()
- On Error GoTo ExitSub
- Dlg.CancelError = True
- Dlg.Flags = cdlCCRGBInit
- Dlg.ShowColor
- SWBDateSelect1.BackColor = Dlg.Color
- ExitSub:
- End Sub
- Private Sub BoldChk_Click()
- SWBDateSelect1.SetTextFont "MS Sans Serif", FontBold:=(BoldChk.Value = vbChecked)
- End Sub
- Private Sub CloseBtn_Click()
- Unload Me
- End Sub
- Private Sub ForeColorBtn_Click()
- On Error GoTo ExitSub
- Dlg.CancelError = True
- Dlg.Flags = cdlCCRGBInit
- Dlg.ShowColor
- SWBDateSelect1.ForeColor = Dlg.Color
- ExitSub:
- End Sub
- Private Sub Form_Load()
- SWBDateSelect1.Enabled = True
- cboDateFmt.Text = SWBDateSelect1.DateFormat
- End Sub
- Private Sub HScroll1_Change()
- SWBDateSelect1.SetTextFont "MS Sans Serif", HScroll1.Value
- FontSizeTxt.Text = CStr(HScroll1.Value)
- End Sub
- Private Sub ItalicChk_Click()
- SWBDateSelect1.SetTextFont "MS Sans Serif", FontItalic:=(ItalicChk.Value = vbChecked)
- End Sub
- Private Sub SetBtn_Click()
- SWBDateSelect1.DateFormat = cboDateFmt.Text
- SWBDateSelect1.DateValue = SWBDateSelect1.DateValue
- End Sub
- Private Sub UnderlineChk_Click()
- SWBDateSelect1.SetTextFont "MS Sans Serif", FontUnderline:=(UnderlineChk.Value = vbChecked)
- End Sub
-