home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / source / chap36 / settings.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-08-04  |  4.3 KB  |  146 lines

  1. VERSION 4.00
  2. Begin VB.Form frmSettings 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Team Selection Settings"
  5.    ClientHeight    =   3855
  6.    ClientLeft      =   2445
  7.    ClientTop       =   1950
  8.    ClientWidth     =   4815
  9.    ControlBox      =   0   'False
  10.    Height          =   4260
  11.    Left            =   2385
  12.    LinkTopic       =   "Form1"
  13.    LockControls    =   -1  'True
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   3855
  17.    ScaleWidth      =   4815
  18.    ShowInTaskbar   =   0   'False
  19.    Top             =   1605
  20.    Width           =   4935
  21.    Begin VB.Frame Frame1 
  22.       Caption         =   "General Information"
  23.       Height          =   1455
  24.       Left            =   120
  25.       TabIndex        =   3
  26.       Top             =   300
  27.       Width           =   4605
  28.       Begin VB.Label lblCandidates 
  29.          Alignment       =   2  'Center
  30.          Caption         =   "Candidates"
  31.          Height          =   225
  32.          Left            =   60
  33.          TabIndex        =   6
  34.          Top             =   1050
  35.          Width           =   4485
  36.       End
  37.       Begin VB.Label lblJobs 
  38.          Alignment       =   2  'Center
  39.          Caption         =   "Jobs"
  40.          Height          =   225
  41.          Left            =   60
  42.          TabIndex        =   5
  43.          Top             =   720
  44.          Width           =   4485
  45.       End
  46.       Begin VB.Label lblProject 
  47.          Alignment       =   2  'Center
  48.          Caption         =   "Project"
  49.          Height          =   225
  50.          Left            =   90
  51.          TabIndex        =   4
  52.          Top             =   360
  53.          Width           =   4455
  54.       End
  55.    End
  56.    Begin VB.CheckBox chkExactOn 
  57.       Caption         =   "Only consider EXACT skill matches"
  58.       Height          =   345
  59.       Left            =   960
  60.       TabIndex        =   2
  61.       Top             =   1890
  62.       Width           =   2955
  63.    End
  64.    Begin VB.CommandButton cmdCancel 
  65.       Caption         =   "&Cancel"
  66.       Height          =   525
  67.       Left            =   2520
  68.       TabIndex        =   1
  69.       Top             =   3150
  70.       Width           =   1245
  71.    End
  72.    Begin VB.CommandButton cmdOK 
  73.       Caption         =   "&Start"
  74.       Height          =   525
  75.       Left            =   1080
  76.       TabIndex        =   0
  77.       Top             =   3150
  78.       Width           =   1245
  79.    End
  80.    Begin VB.Label lblStartTime 
  81.       Alignment       =   2  'Center
  82.       Height          =   315
  83.       Left            =   0
  84.       TabIndex        =   7
  85.       Top             =   2490
  86.       Width           =   4815
  87.    End
  88. Attribute VB_Name = "frmSettings"
  89. Attribute VB_Creatable = False
  90. Attribute VB_Exposed = False
  91. Option Explicit
  92. Private Sub cmdCancel_Click()
  93.   If Not cmdOK.Visible Then
  94.     MousePointer = 13
  95.     gCancelMessage = 1
  96.   Else
  97.     Unload frmSettings
  98.   End If
  99. End Sub
  100. Private Sub cmdOK_Click()
  101.   Dim cost As Double
  102.   Screen.MousePointer = 11
  103.   chkExactOn.Enabled = False
  104.   'Translate the checkbox (1,0) values to (TRUE,FALSE).
  105.   If chkExactOn = 0 Then
  106.     gExactSkills = False
  107.   Else
  108.     gExactSkills = True
  109.   End If
  110.   lblStartTime.Caption = "Started search at " + Format$(Now)
  111.   cmdOK.Visible = False
  112.   cmdCancel.Visible = False
  113.   cmdCancel.Width = frmSettings.Width - 1000
  114.   cmdCancel.Left = 500
  115.   cmdCancel.Visible = True
  116.   initAll
  117.   frmSettings.Refresh
  118.   'Now start the search.
  119.   cost = BB()
  120.   'Notify of finish.
  121.   Beep
  122.   frmMain.dbaCandidateProject.Refresh
  123.   If cost >= 0 Then  'Do we have a team?
  124.     MousePointer = 0
  125.     MsgBox "Found a team with absolute cost of " + Format$(cost, "#,##0") + " at " + Str$(Now), 48, gProgramTitle
  126.   End If
  127.   'Done.
  128.   cmdCancel.Caption = "&OK"
  129.   Unload frmSettings
  130. End Sub
  131. Private Sub Form_Load()
  132.   Left = (Screen.Width - Width) / 2
  133.   TOP = (Screen.Height - Height) / 2
  134.   MousePointer = 0
  135.   gCancelMessage = 0
  136.   lblProject = frmMain.cboProjectTeam
  137.   lblJobs = "There are " + Str$(JobsInProject) + " jobs in this project."
  138.   lblCandidates = "There are " + Str$(EmpsInPool) + " available candidates."
  139. End Sub
  140. Private Sub Form_Unload(Cancel As Integer)
  141.   frmMain.cboProjectTeam.Refresh
  142.   frmMain.lstTeams.Refresh
  143.   frmMain.Refresh
  144.   Screen.MousePointer = 0
  145. End Sub
  146.