home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / tool / various / ctdemo / ct_sched.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-02-26  |  20.5 KB  |  614 lines

  1. VERSION 2.00
  2. Begin Form w_sched_demo 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "ctSHED and ctRULER (Scheduling Bar and Ruler) Demo"
  5.    ClientHeight    =   6045
  6.    ClientLeft      =   90
  7.    ClientTop       =   900
  8.    ClientWidth     =   9360
  9.    Height          =   6570
  10.    Icon            =   CT_SCHED.FRX:0000
  11.    Left            =   30
  12.    LinkTopic       =   "Form1"
  13.    MDIChild        =   -1  'True
  14.    ScaleHeight     =   6045
  15.    ScaleWidth      =   9360
  16.    Top             =   435
  17.    Width           =   9480
  18.    WindowState     =   2  'Maximized
  19.    Begin ctSCHED ctSched 
  20.       AllowOverlap    =   0   'False
  21.       AllowReversal   =   -1  'True
  22.       BackColor       =   &H00FFFFFF&
  23.       BarBorder       =   0   'False
  24.       BarColor        =   &H000000C0&
  25.       BarEnd          =   0
  26.       BarStart        =   0
  27.       BorderColor     =   &H00000000&
  28.       BorderType      =   0  'Regular
  29.       Height          =   495
  30.       Index           =   6
  31.       InnerBottom     =   12
  32.       InnerColor      =   &H00FFFFFF&
  33.       InnerLeft       =   1
  34.       InnerRight      =   1
  35.       InnerTop        =   5
  36.       Left            =   1320
  37.       MaxValue        =   120
  38.       MinValue        =   0
  39.       PicEndFront     =   0   'False
  40.       PicEndHide      =   0   'False
  41.       PicEndXOffset   =   0
  42.       PicEndYOffset   =   0
  43.       PicStartFront   =   0   'False
  44.       PicStartHide    =   0   'False
  45.       PicStartXOffset =   0
  46.       PicStartYOffset =   0
  47.       ReverseOffsets  =   0   'False
  48.       TabIndex        =   12
  49.       TipExtension    =   0
  50.       TipSize         =   4
  51.       Top             =   4560
  52.       Width           =   7695
  53.    End
  54.    Begin CommandButton Command1 
  55.       Caption         =   "E&xit"
  56.       Height          =   435
  57.       Left            =   8340
  58.       TabIndex        =   9
  59.       Top             =   5310
  60.       Width           =   855
  61.    End
  62.    Begin ctSCHED ctSched 
  63.       AllowOverlap    =   0   'False
  64.       AllowReversal   =   -1  'True
  65.       BackColor       =   &H00FFFFFF&
  66.       BarBorder       =   0   'False
  67.       BarColor        =   &H000000FF&
  68.       BarEnd          =   0
  69.       BarStart        =   0
  70.       BorderColor     =   &H00000000&
  71.       BorderType      =   0  'Regular
  72.       Height          =   495
  73.       Index           =   5
  74.       InnerBottom     =   12
  75.       InnerColor      =   &H00FFFFFF&
  76.       InnerLeft       =   1
  77.       InnerRight      =   1
  78.       InnerTop        =   5
  79.       Left            =   1320
  80.       MaxValue        =   120
  81.       MinValue        =   0
  82.       PicEndFront     =   0   'False
  83.       PicEndHide      =   0   'False
  84.       PicEndXOffset   =   0
  85.       PicEndYOffset   =   0
  86.       PicStartFront   =   0   'False
  87.       PicStartHide    =   0   'False
  88.       PicStartXOffset =   0
  89.       PicStartYOffset =   0
  90.       ReverseOffsets  =   0   'False
  91.       TabIndex        =   8
  92.       TipExtension    =   0
  93.       TipSize         =   4
  94.       Top             =   4080
  95.       Width           =   7695
  96.    End
  97.    Begin ctSCHED ctSched 
  98.       AllowOverlap    =   0   'False
  99.       AllowReversal   =   -1  'True
  100.       BackColor       =   &H00FFFFFF&
  101.       BarBorder       =   -1  'True
  102.       BarColor        =   &H000000FF&
  103.       BarEnd          =   0
  104.       BarStart        =   0
  105.       BorderColor     =   &H00000000&
  106.       BorderType      =   0  'Regular
  107.       Height          =   495
  108.       Index           =   4
  109.       InnerBottom     =   16
  110.       InnerColor      =   &H00FFFFFF&
  111.       InnerLeft       =   1
  112.       InnerRight      =   1
  113.       InnerTop        =   5
  114.       Left            =   1320
  115.       MaxValue        =   120
  116.       MinValue        =   0
  117.       PicEndFront     =   -1  'True
  118.       PicEndHide      =   0   'False
  119.       PicEndXOffset   =   0
  120.       PicEndYOffset   =   2
  121.       PicStartFront   =   -1  'True
  122.       PicStartHide    =   0   'False
  123.       PicStartXOffset =   0
  124.       PicStartYOffset =   2
  125.       PictureEnd      =   CT_SCHED.FRX:0302
  126.       PictureStart    =   CT_SCHED.FRX:0604
  127.       ReverseOffsets  =   0   'False
  128.       TabIndex        =   7
  129.       TipExtension    =   4
  130.       TipSize         =   4
  131.       Top             =   3600
  132.       Width           =   7695
  133.    End
  134.    Begin ctSCHED ctSched 
  135.       AllowOverlap    =   0   'False
  136.       AllowReversal   =   -1  'True
  137.       BackColor       =   &H00FFFFFF&
  138.       BarBorder       =   -1  'True
  139.       BarColor        =   &H000000FF&
  140.       BarEnd          =   0
  141.       BarStart        =   0
  142.       BorderColor     =   &H00000000&
  143.       BorderType      =   0  'Regular
  144.       Height          =   495
  145.       Index           =   3
  146.       InnerBottom     =   16
  147.       InnerColor      =   &H00FFFFFF&
  148.       InnerLeft       =   1
  149.       InnerRight      =   1
  150.       InnerTop        =   5
  151.       Left            =   1320
  152.       MaxValue        =   120
  153.       MinValue        =   0
  154.       PicEndFront     =   -1  'True
  155.       PicEndHide      =   0   'False
  156.       PicEndXOffset   =   0
  157.       PicEndYOffset   =   2
  158.       PicStartFront   =   -1  'True
  159.       PicStartHide    =   0   'False
  160.       PicStartXOffset =   0
  161.       PicStartYOffset =   2
  162.       PictureEnd      =   CT_SCHED.FRX:0906
  163.       PictureStart    =   CT_SCHED.FRX:0C08
  164.       ReverseOffsets  =   0   'False
  165.       TabIndex        =   6
  166.       TipExtension    =   4
  167.       TipSize         =   4
  168.       Top             =   3120
  169.       Width           =   7695
  170.    End
  171.    Begin VScrollBar VScroll1 
  172.       Enabled         =   0   'False
  173.       Height          =   3375
  174.       Left            =   9000
  175.       TabIndex        =   5
  176.       Top             =   1680
  177.       Width           =   255
  178.    End
  179.    Begin ctSCHED ctSched 
  180.       AllowOverlap    =   0   'False
  181.       AllowReversal   =   -1  'True
  182.       BackColor       =   &H00FFFFFF&
  183.       BarBorder       =   0   'False
  184.       BarColor        =   &H000000FF&
  185.       BarEnd          =   0
  186.       BarStart        =   0
  187.       BorderColor     =   &H00000000&
  188.       BorderType      =   0  'Regular
  189.       Height          =   495
  190.       Index           =   2
  191.       InnerBottom     =   12
  192.       InnerColor      =   &H00FFFFFF&
  193.       InnerLeft       =   1
  194.       InnerRight      =   1
  195.       InnerTop        =   5
  196.       Left            =   1320
  197.       MaxValue        =   120
  198.       MinValue        =   0
  199.       PicEndFront     =   0   'False
  200.       PicEndHide      =   0   'False
  201.       PicEndXOffset   =   0
  202.       PicEndYOffset   =   0
  203.       PicStartFront   =   0   'False
  204.       PicStartHide    =   0   'False
  205.       PicStartXOffset =   0
  206.       PicStartYOffset =   0
  207.       ReverseOffsets  =   0   'False
  208.       TabIndex        =   4
  209.       TipExtension    =   0
  210.       TipSize         =   4
  211.       Top             =   2640
  212.       Width           =   7695
  213.    End
  214.    Begin ctSCHED ctSched 
  215.       AllowOverlap    =   0   'False
  216.       AllowReversal   =   -1  'True
  217.       BackColor       =   &H00FFFFFF&
  218.       BarBorder       =   0   'False
  219.       BarColor        =   &H000000C0&
  220.       BarEnd          =   0
  221.       BarStart        =   0
  222.       BorderColor     =   &H00000000&
  223.       BorderType      =   0  'Regular
  224.       Height          =   495
  225.       Index           =   1
  226.       InnerBottom     =   12
  227.       InnerColor      =   &H00FFFFFF&
  228.       InnerLeft       =   1
  229.       InnerRight      =   1
  230.       InnerTop        =   5
  231.       Left            =   1320
  232.       MaxValue        =   120
  233.       MinValue        =   0
  234.       PicEndFront     =   0   'False
  235.       PicEndHide      =   0   'False
  236.       PicEndXOffset   =   0
  237.       PicEndYOffset   =   0
  238.       PicStartFront   =   0   'False
  239.       PicStartHide    =   0   'False
  240.       PicStartXOffset =   0
  241.       PicStartYOffset =   0
  242.       ReverseOffsets  =   0   'False
  243.       TabIndex        =   3
  244.       TipExtension    =   0
  245.       TipSize         =   4
  246.       Top             =   2160
  247.       Width           =   7695
  248.    End
  249.    Begin ctSCHED ctSched 
  250.       AllowOverlap    =   0   'False
  251.       AllowReversal   =   -1  'True
  252.       BackColor       =   &H00FFFFFF&
  253.       BarBorder       =   -1  'True
  254.       BarColor        =   &H000000FF&
  255.       BarEnd          =   40
  256.       BarStart        =   20
  257.       BorderColor     =   &H00000000&
  258.       BorderType      =   0  'Regular
  259.       Height          =   495
  260.       Index           =   0
  261.       InnerBottom     =   16
  262.       InnerColor      =   &H00FFFFFF&
  263.       InnerLeft       =   1
  264.       InnerRight      =   1
  265.       InnerTop        =   5
  266.       Left            =   1320
  267.       MaxValue        =   120
  268.       MinValue        =   0
  269.       PicEndFront     =   -1  'True
  270.       PicEndHide      =   0   'False
  271.       PicEndXOffset   =   0
  272.       PicEndYOffset   =   2
  273.       PicStartFront   =   -1  'True
  274.       PicStartHide    =   0   'False
  275.       PicStartXOffset =   0
  276.       PicStartYOffset =   2
  277.       PictureEnd      =   CT_SCHED.FRX:0F0A
  278.       PictureStart    =   CT_SCHED.FRX:120C
  279.       ReverseOffsets  =   0   'False
  280.       TabIndex        =   2
  281.       TipExtension    =   3
  282.       TipSize         =   4
  283.       Top             =   1680
  284.       Width           =   7695
  285.    End
  286.    Begin ctFRAME ctFrame1 
  287.       Align           =   1  'Align Top
  288.       BackColor       =   &H00C0C0C0&
  289.       BorderColor     =   &H00000000&
  290.       DistanceApart   =   5
  291.       Height          =   525
  292.       InnerBorder     =   1  'None
  293.       InnerWidth      =   1
  294.       Left            =   0
  295.       OuterBorder     =   0  'Regular
  296.       OuterWidth      =   1
  297.       ShadowColor     =   &H00808080&
  298.       ShowBottom      =   -1  'True
  299.       ShowLeft        =   0   'False
  300.       ShowRight       =   0   'False
  301.       ShowTop         =   0   'False
  302.       TabIndex        =   0
  303.       Top             =   0
  304.       Width           =   9360
  305.       Begin ctRULER ctRuler 
  306.          BackColor       =   &H00C0C0C0&
  307.          BorderColor     =   &H00000000&
  308.          BorderType      =   1  'None
  309.          FontBold        =   0   'False
  310.          FontItalic      =   0   'False
  311.          FontName        =   "MS Sans Serif"
  312.          FontSize        =   8.25
  313.          FontStrikethru  =   0   'False
  314.          FontUnderline   =   0   'False
  315.          ForeColor       =   &H00800000&
  316.          Height          =   540
  317.          InnerBottom     =   0
  318.          InnerLeft       =   1
  319.          InnerRight      =   1
  320.          InnerTop        =   0
  321.          Left            =   1320
  322.          LineAlternate   =   -1  'True
  323.          LinePosition    =   1  'Bottom/Right
  324.          LineThreeD      =   -1  'True
  325.          MarkerColor     =   &H000000FF&
  326.          MarkerValue1    =   -1
  327.          MarkerValue2    =   -1
  328.          MaxValue        =   120
  329.          MinValue        =   0
  330.          RulerType       =   1  'Horizontal
  331.          ShowDivisions   =   4
  332.          ShowMax         =   12
  333.          ShowMin         =   0
  334.          ShowMultiply    =   1
  335.          ShowType        =   3  'Time Value (x:00)
  336.          TabIndex        =   1
  337.          TextPosition    =   0  'Top/Left
  338.          TextXOffset     =   0
  339.          TextYOffset     =   0
  340.          Top             =   -30
  341.          Width           =   7695
  342.       End
  343.       Begin Label Label2 
  344.          BackColor       =   &H00C0C0C0&
  345.          Caption         =   "Time :"
  346.          FontBold        =   0   'False
  347.          FontItalic      =   0   'False
  348.          FontName        =   "MS Sans Serif"
  349.          FontSize        =   9.75
  350.          FontStrikethru  =   0   'False
  351.          FontUnderline   =   0   'False
  352.          ForeColor       =   &H00000000&
  353.          Height          =   255
  354.          Left            =   420
  355.          TabIndex        =   13
  356.          Top             =   120
  357.          Width           =   675
  358.       End
  359.    End
  360.    Begin ctTEXT ctText 
  361.       Alignment       =   2  'Centered
  362.       BackColor       =   &H00C0C0C0&
  363.       BorderColor     =   &H00000000&
  364.       BorderType      =   3  'Lowered
  365.       Caption         =   "Employee #1"
  366.       FontBold        =   0   'False
  367.       FontItalic      =   0   'False
  368.       FontName        =   "MS Sans Serif"
  369.       FontSize        =   8.25
  370.       FontStrikethru  =   0   'False
  371.       FontUnderline   =   0   'False
  372.       ForeColor       =   &H00000000&
  373.       Height          =   495
  374.       Index           =   0
  375.       Left            =   60
  376.       PicPosition     =   0  'Center
  377.       ShadowColor     =   &H00000000&
  378.       SingleLine      =   -1  'True
  379.       TabIndex        =   10
  380.       TextAngle       =   0
  381.       TextPosition    =   1  'Center
  382.       ThreeDColor     =   &H00808080&
  383.       ThreeDText      =   0   'False
  384.       Top             =   1680
  385.       Width           =   1275
  386.    End
  387.    Begin ctTEXT ctText 
  388.       Alignment       =   2  'Centered
  389.       BackColor       =   &H00C0C0C0&
  390.       BorderColor     =   &H00000000&
  391.       BorderType      =   3  'Lowered
  392.       Caption         =   "Employee #2"
  393.       FontBold        =   0   'False
  394.       FontItalic      =   0   'False
  395.       FontName        =   "MS Sans Serif"
  396.       FontSize        =   8.25
  397.       FontStrikethru  =   0   'False
  398.       FontUnderline   =   0   'False
  399.       ForeColor       =   &H00000000&
  400.       Height          =   495
  401.       Index           =   1
  402.       Left            =   60
  403.       PicPosition     =   0  'Center
  404.       ShadowColor     =   &H00000000&
  405.       SingleLine      =   -1  'True
  406.       TabIndex        =   11
  407.       TextAngle       =   0
  408.       TextPosition    =   1  'Center
  409.       ThreeDColor     =   &H00808080&
  410.       ThreeDText      =   0   'False
  411.       Top             =   2160
  412.       Width           =   1275
  413.    End
  414.    Begin ctTEXT ctText 
  415.       Alignment       =   2  'Centered
  416.       BackColor       =   &H00C0C0C0&
  417.       BorderColor     =   &H00000000&
  418.       BorderType      =   3  'Lowered
  419.       Caption         =   "Employee #3"
  420.       FontBold        =   0   'False
  421.       FontItalic      =   0   'False
  422.       FontName        =   "MS Sans Serif"
  423.       FontSize        =   8.25
  424.       FontStrikethru  =   0   'False
  425.       FontUnderline   =   0   'False
  426.       ForeColor       =   &H00000000&
  427.       Height          =   495
  428.       Index           =   2
  429.       Left            =   60
  430.       PicPosition     =   0  'Center
  431.       ShadowColor     =   &H00000000&
  432.       SingleLine      =   -1  'True
  433.       TabIndex        =   14
  434.       TextAngle       =   0
  435.       TextPosition    =   1  'Center
  436.       ThreeDColor     =   &H00808080&
  437.       ThreeDText      =   0   'False
  438.       Top             =   2640
  439.       Width           =   1275
  440.    End
  441.    Begin ctTEXT ctText 
  442.       Alignment       =   2  'Centered
  443.       BackColor       =   &H00C0C0C0&
  444.       BorderColor     =   &H00000000&
  445.       BorderType      =   3  'Lowered
  446.       Caption         =   "Employee #4"
  447.       FontBold        =   0   'False
  448.       FontItalic      =   0   'False
  449.       FontName        =   "MS Sans Serif"
  450.       FontSize        =   8.25
  451.       FontStrikethru  =   0   'False
  452.       FontUnderline   =   0   'False
  453.       ForeColor       =   &H00000000&
  454.       Height          =   495
  455.       Index           =   3
  456.       Left            =   60
  457.       PicPosition     =   0  'Center
  458.       ShadowColor     =   &H00000000&
  459.       SingleLine      =   -1  'True
  460.       TabIndex        =   15
  461.       TextAngle       =   0
  462.       TextPosition    =   1  'Center
  463.       ThreeDColor     =   &H00808080&
  464.       ThreeDText      =   0   'False
  465.       Top             =   3120
  466.       Width           =   1275
  467.    End
  468.    Begin ctTEXT ctText 
  469.       Alignment       =   2  'Centered
  470.       BackColor       =   &H00C0C0C0&
  471.       BorderColor     =   &H00000000&
  472.       BorderType      =   3  'Lowered
  473.       Caption         =   "Employee #5"
  474.       FontBold        =   0   'False
  475.       FontItalic      =   0   'False
  476.       FontName        =   "MS Sans Serif"
  477.       FontSize        =   8.25
  478.       FontStrikethru  =   0   'False
  479.       FontUnderline   =   0   'False
  480.       ForeColor       =   &H00000000&
  481.       Height          =   495
  482.       Index           =   4
  483.       Left            =   60
  484.       PicPosition     =   0  'Center
  485.       ShadowColor     =   &H00000000&
  486.       SingleLine      =   -1  'True
  487.       TabIndex        =   16
  488.       TextAngle       =   0
  489.       TextPosition    =   1  'Center
  490.       ThreeDColor     =   &H00808080&
  491.       ThreeDText      =   0   'False
  492.       Top             =   3600
  493.       Width           =   1275
  494.    End
  495.    Begin ctTEXT ctText 
  496.       Alignment       =   2  'Centered
  497.       BackColor       =   &H00C0C0C0&
  498.       BorderColor     =   &H00000000&
  499.       BorderType      =   3  'Lowered
  500.       Caption         =   "Employee #6"
  501.       FontBold        =   0   'False
  502.       FontItalic      =   0   'False
  503.       FontName        =   "MS Sans Serif"
  504.       FontSize        =   8.25
  505.       FontStrikethru  =   0   'False
  506.       FontUnderline   =   0   'False
  507.       ForeColor       =   &H00000000&
  508.       Height          =   495
  509.       Index           =   5
  510.       Left            =   60
  511.       PicPosition     =   0  'Center
  512.       ShadowColor     =   &H00000000&
  513.       SingleLine      =   -1  'True
  514.       TabIndex        =   17
  515.       TextAngle       =   0
  516.       TextPosition    =   1  'Center
  517.       ThreeDColor     =   &H00808080&
  518.       ThreeDText      =   0   'False
  519.       Top             =   4080
  520.       Width           =   1275
  521.    End
  522.    Begin ctTEXT ctText 
  523.       Alignment       =   2  'Centered
  524.       BackColor       =   &H00C0C0C0&
  525.       BorderColor     =   &H00000000&
  526.       BorderType      =   3  'Lowered
  527.       Caption         =   "Employee #7"
  528.       FontBold        =   0   'False
  529.       FontItalic      =   0   'False
  530.       FontName        =   "MS Sans Serif"
  531.       FontSize        =   8.25
  532.       FontStrikethru  =   0   'False
  533.       FontUnderline   =   0   'False
  534.       ForeColor       =   &H00000000&
  535.       Height          =   495
  536.       Index           =   6
  537.       Left            =   60
  538.       PicPosition     =   0  'Center
  539.       ShadowColor     =   &H00000000&
  540.       SingleLine      =   -1  'True
  541.       TabIndex        =   18
  542.       TextAngle       =   0
  543.       TextPosition    =   1  'Center
  544.       ThreeDColor     =   &H00808080&
  545.       ThreeDText      =   0   'False
  546.       Top             =   4560
  547.       Width           =   1275
  548.    End
  549.    Begin Label Label3 
  550.       BackStyle       =   0  'Transparent
  551.       Caption         =   "Bitmaps or icons can be assigned to each end of a scheduling bar. This allows the programmer to use the VBX as a sort of gantt chart control."
  552.       FontBold        =   0   'False
  553.       FontItalic      =   0   'False
  554.       FontName        =   "MS Sans Serif"
  555.       FontSize        =   8.25
  556.       FontStrikethru  =   0   'False
  557.       FontUnderline   =   0   'False
  558.       ForeColor       =   &H00800000&
  559.       Height          =   495
  560.       Left            =   1320
  561.       TabIndex        =   20
  562.       Top             =   5220
  563.       Width           =   6375
  564.    End
  565.    Begin Label Label1 
  566.       Alignment       =   2  'Center
  567.       BackStyle       =   0  'Transparent
  568.       Caption         =   "This demonstration uses the ctSCHED (Scheduling Bar) , ctRULER, ctFRAME and ctTEXT to create a type of employee scheduling system. To start scheduling an employee, click and drag the mouse along one of the white bars below. The scheduling bars can be moved by clicking and dragging along the middle of the bar. They can be re-sized by clicking and dragging along the ends of the bar."
  569.       FontBold        =   0   'False
  570.       FontItalic      =   0   'False
  571.       FontName        =   "MS Sans Serif"
  572.       FontSize        =   8.25
  573.       FontStrikethru  =   0   'False
  574.       FontUnderline   =   0   'False
  575.       ForeColor       =   &H00800000&
  576.       Height          =   825
  577.       Left            =   360
  578.       TabIndex        =   19
  579.       Top             =   660
  580.       Width           =   8595
  581.    End
  582. Dim nActive As Integer
  583. Sub Command1_Click ()
  584.    Unload w_sched_demo
  585. End Sub
  586. Sub ctCheck_Click ()
  587. End Sub
  588. Sub ctSched_BarChange (Index As Integer, nStartBar As Integer, nEndBar As Integer)
  589.    ctRuler.MarkerValue1 = ctSched(Index).BarStart
  590.    ctRuler.MarkerValue2 = ctSched(Index).BarEnd
  591. End Sub
  592. Sub ctSched_GotFocus (Index As Integer)
  593.    If ctSched(Index).BarStart > 0 Then
  594.       ctRuler.MarkerValue1 = ctSched(Index).BarStart
  595.    End If
  596.    If ctSched(Index).BarEnd > 0 Then
  597.       ctRuler.MarkerValue2 = ctSched(Index).BarEnd
  598.    End If
  599.    nActive = Index
  600.    ctText(Index).FontBold = True
  601. End Sub
  602. Sub ctSched_LostFocus (Index As Integer)
  603.    nActive = -1
  604.    ctText(Index).FontBold = False
  605. End Sub
  606. Sub Form_Load ()
  607.    ' Center the window on the screen
  608.    Move (Screen.Width - Width) / 2, (Screen.Height - Height) * .25
  609.    w_mdi_main.bt_sched = BUTTON_DISABLE
  610. End Sub
  611. Sub Form_Unload (Cancel As Integer)
  612.    w_mdi_main.bt_sched = BUTTON_UP
  613. End Sub
  614.