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

  1. VERSION 4.00
  2. Begin VB.Form DateFrm 
  3.    Caption         =   "Data Entry Controls"
  4.    ClientHeight    =   7395
  5.    ClientLeft      =   1155
  6.    ClientTop       =   1740
  7.    ClientWidth     =   8190
  8.    Height          =   7800
  9.    Left            =   1095
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   7395
  12.    ScaleWidth      =   8190
  13.    Top             =   1395
  14.    Width           =   8310
  15.    Begin VB.CommandButton Command5 
  16.       Caption         =   "Set Date"
  17.       Height          =   495
  18.       Left            =   2520
  19.       TabIndex        =   19
  20.       Top             =   2400
  21.       Width           =   975
  22.    End
  23.    Begin VB.CommandButton Command4 
  24.       Caption         =   "Clear"
  25.       Height          =   375
  26.       Left            =   2760
  27.       TabIndex        =   8
  28.       Top             =   3960
  29.       Width           =   1095
  30.    End
  31.    Begin VB.CommandButton Command3 
  32.       Caption         =   "Stop Clock"
  33.       Height          =   375
  34.       Left            =   1440
  35.       TabIndex        =   7
  36.       Top             =   3960
  37.       Width           =   1095
  38.    End
  39.    Begin VB.CommandButton Command2 
  40.       Caption         =   "Start Clock"
  41.       Height          =   375
  42.       Left            =   120
  43.       TabIndex        =   6
  44.       Top             =   3960
  45.       Width           =   1095
  46.    End
  47.    Begin VB.CommandButton Command1 
  48.       Caption         =   "Calendar"
  49.       Height          =   495
  50.       Left            =   2520
  51.       TabIndex        =   1
  52.       Top             =   1080
  53.       Width           =   975
  54.    End
  55.    Begin VB.Label Label13 
  56.       Caption         =   "United States"
  57.       Height          =   255
  58.       Left            =   4320
  59.       TabIndex        =   33
  60.       Top             =   4800
  61.       Width           =   3015
  62.    End
  63.    Begin VB.Label Label12 
  64.       Caption         =   "United Kingdom"
  65.       Height          =   255
  66.       Left            =   4320
  67.       TabIndex        =   32
  68.       Top             =   5520
  69.       Width           =   3015
  70.    End
  71.    Begin VB.Label Label11 
  72.       Caption         =   "Germany"
  73.       Height          =   255
  74.       Left            =   4320
  75.       TabIndex        =   31
  76.       Top             =   6360
  77.       Width           =   3015
  78.    End
  79.    Begin PVCurrencyLib.PVCurrency PVCurrency3 
  80.       Height          =   375
  81.       Left            =   4320
  82.       TabIndex        =   30
  83.       Top             =   5040
  84.       Width           =   3015
  85.       _Version        =   65541
  86.       _ExtentX        =   5318
  87.       _ExtentY        =   661
  88.       _StockProps     =   244
  89.       Text            =   "$0.00"
  90.       Appearance      =   1
  91.       FormatNegative  =   1
  92.       Value           =   0
  93.    End
  94.    Begin PVMaskEditLib.PVMaskEdit PVMaskEdit2 
  95.       Height          =   390
  96.       Left            =   240
  97.       TabIndex        =   29
  98.       Top             =   6720
  99.       Width           =   3705
  100.       _Version        =   65541
  101.       _ExtentX        =   6535
  102.       _ExtentY        =   688
  103.       _StockProps     =   244
  104.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  105.          name            =   "MS Sans Serif"
  106.          charset         =   0
  107.          weight          =   400
  108.          size            =   12
  109.          underline       =   0   'False
  110.          italic          =   0   'False
  111.          strikethrough   =   0   'False
  112.       EndProperty
  113.       Appearance      =   1
  114.       DisplayFormat   =   1
  115.       Text            =   ""
  116.       Mask            =   "###-##-####"
  117.       HighlightColor  =   12632256
  118.    End
  119.    Begin PVMaskEditLib.PVMaskEdit PVMaskEdit1 
  120.       Height          =   375
  121.       Left            =   240
  122.       TabIndex        =   28
  123.       Top             =   5880
  124.       Width           =   3615
  125.       _Version        =   65541
  126.       _ExtentX        =   6376
  127.       _ExtentY        =   661
  128.       _StockProps     =   244
  129.       Appearance      =   1
  130.       DisplayFormat   =   5
  131.       Text            =   ""
  132.       Mask            =   "(###) ###-#### Ext ####"
  133.       BackColor       =   0
  134.       ForeColor       =   16776960
  135.       HighlightColor  =   12632256
  136.    End
  137.    Begin VB.Label Label10 
  138.       Caption         =   "The masked input field is perfect for phone numbers, social security numbers or other formatted values."
  139.       Height          =   375
  140.       Left            =   120
  141.       TabIndex        =   27
  142.       Top             =   5400
  143.       Width           =   3855
  144.    End
  145.    Begin PVLINE3DLib.PVLine3D PVLine3D4 
  146.       Height          =   30
  147.       Left            =   120
  148.       TabIndex        =   26
  149.       Top             =   5280
  150.       Width           =   3975
  151.       _Version        =   65536
  152.       _ExtentX        =   7011
  153.       _ExtentY        =   53
  154.       _StockProps     =   8
  155.    End
  156.    Begin PVCurrencyLib.PVCurrency PVCurrency2 
  157.       Height          =   375
  158.       Left            =   4320
  159.       TabIndex        =   25
  160.       Top             =   6720
  161.       Width           =   3015
  162.       _Version        =   65541
  163.       _ExtentX        =   5318
  164.       _ExtentY        =   661
  165.       _StockProps     =   244
  166.       Text            =   "DM0,00"
  167.       Appearance      =   1
  168.       Format          =   12
  169.       Symbol          =   "DM"
  170.       DecimalSeparator=   ","
  171.       Value           =   0
  172.    End
  173.    Begin VB.Label Label9 
  174.       Caption         =   "Use the currency control for insertion of various international currencies with different formats."
  175.       Height          =   495
  176.       Left            =   4320
  177.       TabIndex        =   24
  178.       Top             =   4080
  179.       Width           =   3495
  180.    End
  181.    Begin PVCurrencyLib.PVCurrency PVCurrency1 
  182.       Height          =   375
  183.       Left            =   4320
  184.       TabIndex        =   23
  185.       Top             =   5880
  186.       Width           =   3015
  187.       _Version        =   65541
  188.       _ExtentX        =   5318
  189.       _ExtentY        =   661
  190.       _StockProps     =   244
  191.       Text            =   "
  192. 0.00"
  193.       Appearance      =   1
  194.       Format          =   25
  195.       Symbol          =   "
  196.       Value           =   0
  197.    End
  198.    Begin PVLINE3DLib.PVLine3D PVLine3D3 
  199.       Height          =   30
  200.       Left            =   4080
  201.       TabIndex        =   22
  202.       Top             =   3960
  203.       Width           =   4095
  204.       _Version        =   65536
  205.       _ExtentX        =   7223
  206.       _ExtentY        =   53
  207.       _StockProps     =   8
  208.    End
  209.    Begin PVLINE3DLib.PVLine3D PVLine3D2 
  210.       Height          =   7215
  211.       Left            =   4080
  212.       TabIndex        =   21
  213.       Top             =   120
  214.       Width           =   30
  215.       _Version        =   65536
  216.       _ExtentX        =   53
  217.       _ExtentY        =   12726
  218.       _StockProps     =   8
  219.       LineOrientation =   1
  220.    End
  221.    Begin PVLINE3DLib.PVLine3D PVLine3D1 
  222.       Height          =   30
  223.       Left            =   120
  224.       TabIndex        =   20
  225.       Top             =   3120
  226.       Width           =   3975
  227.       _Version        =   65536
  228.       _ExtentX        =   7011
  229.       _ExtentY        =   53
  230.       _StockProps     =   8
  231.    End
  232.    Begin VB.Label Label8 
  233.       Caption         =   "The Time Edit control can be used as a clock or a data entry control for time values."
  234.       Height          =   495
  235.       Left            =   120
  236.       TabIndex        =   18
  237.       Top             =   3360
  238.       Width           =   3855
  239.    End
  240.    Begin VB.Label Label7 
  241.       Caption         =   "Numeric Control with Odometer Display Style"
  242.       Height          =   255
  243.       Left            =   4320
  244.       TabIndex        =   17
  245.       Top             =   3240
  246.       Width           =   3135
  247.    End
  248.    Begin PVNumericLib.PVNumeric NumEdit4 
  249.       Height          =   375
  250.       Left            =   4320
  251.       TabIndex        =   16
  252.       Top             =   3480
  253.       Width           =   3120
  254.       _Version        =   65541
  255.       _ExtentX        =   5503
  256.       _ExtentY        =   661
  257.       _StockProps     =   244
  258.       Text            =   "0"
  259.       Appearance      =   1
  260.       DisplayFormat   =   3
  261.    End
  262.    Begin VB.Label Label6 
  263.       Caption         =   "Floating point with upper and lower limits"
  264.       Height          =   255
  265.       Left            =   4320
  266.       TabIndex        =   15
  267.       Top             =   2400
  268.       Width           =   3015
  269.    End
  270.    Begin VB.Label Label5 
  271.       Caption         =   "Integer"
  272.       Height          =   255
  273.       Left            =   4320
  274.       TabIndex        =   14
  275.       Top             =   1560
  276.       Width           =   3015
  277.    End
  278.    Begin VB.Label Label4 
  279.       Caption         =   "Real"
  280.       Height          =   255
  281.       Left            =   4320
  282.       TabIndex        =   13
  283.       Top             =   720
  284.       Width           =   2895
  285.    End
  286.    Begin PVNumericLib.PVNumeric NumEdit3 
  287.       Height          =   495
  288.       Left            =   4320
  289.       TabIndex        =   12
  290.       Top             =   2640
  291.       Width           =   3015
  292.       _Version        =   65541
  293.       _ExtentX        =   5318
  294.       _ExtentY        =   873
  295.       _StockProps     =   244
  296.       Text            =   "0"
  297.       Appearance      =   1
  298.    End
  299.    Begin PVNumericLib.PVNumeric NumEdit2 
  300.       Height          =   495
  301.       Left            =   4320
  302.       TabIndex        =   11
  303.       Top             =   1800
  304.       Width           =   3015
  305.       _Version        =   65541
  306.       _ExtentX        =   5318
  307.       _ExtentY        =   873
  308.       _StockProps     =   244
  309.       Text            =   "0"
  310.       Appearance      =   1
  311.       DecimalMax      =   0
  312.    End
  313.    Begin PVNumericLib.PVNumeric NumEdit1 
  314.       Height          =   495
  315.       Left            =   4320
  316.       TabIndex        =   10
  317.       Top             =   960
  318.       Width           =   3015
  319.       _Version        =   65541
  320.       _ExtentX        =   5318
  321.       _ExtentY        =   873
  322.       _StockProps     =   244
  323.       Text            =   "0"
  324.       Appearance      =   1
  325.    End
  326.    Begin VB.Label Label3 
  327.       Caption         =   "The numeric edit control can be formatted for different numeric types and display styles."
  328.       Height          =   495
  329.       Left            =   4200
  330.       TabIndex        =   9
  331.       Top             =   120
  332.       Width           =   3855
  333.    End
  334.    Begin PVTIMELib.PVTime Time1 
  335.       Height          =   615
  336.       Left            =   720
  337.       TabIndex        =   5
  338.       Top             =   4440
  339.       Width           =   2295
  340.       _Version        =   65536
  341.       _ExtentX        =   4048
  342.       _ExtentY        =   1085
  343.       _StockProps     =   228
  344.       Appearance      =   1
  345.       DisplayStyle    =   1
  346.       ShowSeconds     =   -1  'True
  347.    End
  348.    Begin PVDATELib.PVDate DateEdit2 
  349.       Height          =   495
  350.       Left            =   120
  351.       TabIndex        =   4
  352.       Top             =   2400
  353.       Width           =   2175
  354.       _Version        =   65541
  355.       _ExtentX        =   3836
  356.       _ExtentY        =   873
  357.       _StockProps     =   228
  358.       Appearance      =   1
  359.    End
  360.    Begin VB.Label Label2 
  361.       Caption         =   "This date control has the calendar attached directly to it.  Click the down arrow to display the current month in the control."
  362.       Height          =   615
  363.       Left            =   120
  364.       TabIndex        =   3
  365.       Top             =   1680
  366.       Width           =   3615
  367.    End
  368.    Begin VB.Label Label1 
  369.       Caption         =   $"DateFrm.frx":0000
  370.       Height          =   855
  371.       Left            =   120
  372.       TabIndex        =   2
  373.       Top             =   120
  374.       Width           =   3495
  375.    End
  376.    Begin PVDATELib.PVDate DateEdit1 
  377.       Height          =   495
  378.       Left            =   120
  379.       TabIndex        =   0
  380.       Top             =   1080
  381.       Width           =   1935
  382.       _Version        =   65541
  383.       _ExtentX        =   3413
  384.       _ExtentY        =   873
  385.       _StockProps     =   228
  386.       Appearance      =   1
  387.       EnableCalendarControl=   0   'False
  388.    End
  389. Attribute VB_Name = "DateFrm"
  390. Attribute VB_Creatable = False
  391. Attribute VB_Exposed = False
  392. Private Sub Command1_Click()
  393. CalFrm.Show
  394. End Sub
  395. Private Sub Command2_Click()
  396. Time1.StartClock
  397. End Sub
  398. Private Sub Command3_Click()
  399. Time1.StopClock
  400. End Sub
  401. Private Sub Command4_Click()
  402. Time1.Time = "00:00.00"
  403. End Sub
  404. Private Sub Command5_Click()
  405. Rem this code is useful as an example
  406. Rem on how to set and get the date
  407. Rem from the Date Edit control
  408. Dim value As Date
  409. Dim DateDay, DateMonth, DateYear As Integer
  410. Rem retrieve the value from the ProtoView Date Edit
  411. value = DateEdit2.value
  412. Rem retrieve the individual date values
  413. DateDay = Day(value)
  414. DateMonth = Month(value)
  415. DateYear = Year(value)
  416. DateDay = DateDay + 5
  417. If (DateDay > 28) Then
  418.    DateDay = 28
  419. End If
  420. DateMonth = DateMonth - 5
  421. If (DateMonth < 0) Then
  422.    DateMonth = 1
  423. End If
  424. DateYear = DateYear + 10
  425. Rem set the date
  426. value = DateSerial(DateYear, DateMonth, DateDat)
  427. Rem transfer the date to the ProtoView Date Edit control
  428. DateEdit2.value = value
  429. End Sub
  430. Private Sub Form_Load()
  431. Time1.Enabled = True
  432. NumEdit1.SpinButtons = False
  433. NumEdit1.ValueReal = 1.23
  434. NumEdit2.ValueInteger = 45
  435. NumEdit3.ValueReal = 6.789
  436. NumEdit3.LimitValue = True
  437. NumEdit3.ValueMin = 1
  438. NumEdit3.ValueMax = 10
  439. End Sub
  440.