VERSION 5.00
Begin VB.Form frmStep 
   BackColor       =   &H00C0FFFF&
   BorderStyle     =   3  'Fixed Dialog
   ClientHeight    =   2340
   ClientLeft      =   30
   ClientTop       =   30
   ClientWidth     =   3990
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Moveable        =   0   'False
   ScaleHeight     =   2400
   ScaleMode       =   0  'User
   ScaleWidth      =   4056
   ShowInTaskbar   =   0   'False
   Begin VB.TextBox txtStep 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0FFFF&
      BorderStyle     =   0  'None
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1332
      Left            =   240
      Locked          =   -1  'True
      MultiLine       =   -1  'True
      TabIndex        =   2
      Text            =   "Step.frx":0000
      Top             =   240
      Width           =   3612
   End
   Begin VB.CommandButton cmdFinish 
      Caption         =   "Finish"
      Height          =   492
      Left            =   2760
      TabIndex        =   1
      Top             =   1680
      Width           =   972
   End
   Begin VB.CommandButton cmdNext 
      Caption         =   "Next"
      Height          =   492
      Left            =   1320
      TabIndex        =   0
      Top             =   1680
      Width           =   1092
   End
End
Attribute VB_Name = "frmStep"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Dim BStep As Integer

Dim BC0 As ColorConstants
Dim BC1 As ColorConstants
    


Private Sub cmdFinish_Click()
                
    Call frmDemo.SetTextFields(True)
    
    frmDemo.cmdBuild.Visible = True
    frmDemo.cmdStep.Visible = True
    frmDemo.cmdClear.Visible = True

    '--------------  Reset Background Color -------------
    Select Case BStep
    
        Case 2
            frmDemo.txtFCC2.BackColor = BC0
            frmDemo.txtDPID2.BackColor = BC0
            frmDemo.txtUserInfo2.BackColor = BC0
        Case 3
            frmDemo.txtFCC2.BackColor = BC0
            frmDemo.txtDPID2.BackColor = BC0
            frmDemo.txtPadding2.BackColor = BC0
            frmDemo.txt3.BackColor = BC0
            frmDemo.txtUserInfo2.BackColor = BC0
        Case 4
            frmDemo.txt3.BackColor = BC0
            frmDemo.Txt4.BackColor = BC0
            frmDemo.txtUserInfo2.BackColor = BC0
        Case 5
            frmDemo.Txt4.BackColor = BC0
            frmDemo.txt5.BackColor = BC0
   
        Case 6
            frmDemo.Txt4.BackColor = BC0
            frmDemo.txt5.BackColor = BC0
            frmDemo.txt6.BackColor = BC0
    
        Case 7
            frmDemo.txt5.BackColor = BC0
            frmDemo.txt6.BackColor = BC0
            frmDemo.txt7.BackColor = BC0
            frmDemo.txt9.BackColor = BC0
            
        Case 8
            frmDemo.txt7.BackColor = BC0
            frmDemo.txt8.BackColor = BC0
            frmDemo.txtBCStr.BackColor = BC0
            frmDemo.PicBC.BackColor = BC0
            frmDemo.txtBCStr.BackColor = BC0
            frmDemo.PicBC.BackColor = BC0
            frmDemo.txt9.BackColor = BC0
            
        Case 9
            frmDemo.txt9.BackColor = BC0
            frmDemo.txtBCStr.BackColor = BC0
            frmDemo.PicBC.BackColor = BC0
        
        Case 10
            frmDemo.txtBCStr.BackColor = BC0
            frmDemo.PicBC.BackColor = BC0
            frmDemo.txt9.BackColor = BC0
            
            frmDemo.DisplayBarcode (frmDemo.txtBCStr)
    
    End Select
    


    Unload Me
    
End Sub


Private Sub cmdNext_Click()

    Dim x As Integer
    Dim y As Integer
    Dim ydist As Integer
    
    'Define carriage return line feed
    Dim CRLF As String
    CRLF = Chr$(13) & Chr$(10)

    

    y = frmDemo.Top
    x = frmDemo.Left
    ydist = 800
    BStep = BStep + 1
    
    Select Case BStep
    
        'Nb.  case 3 displays text box 2 etc.
        Case 3
            frmStep.Top = y + frmDemo.txt3.Top + frmDemo.txt3.Height + ydist
            frmStep.Left = x + frmDemo.txt3.Left
            
            'Presentation Version
            txtStep = "*  Generated bar state values are " & CRLF + _
                      "   concatenated." & CRLF + _
                      "*  Check if the bar state value string" & CRLF + _
                      "   is divisible by 3.  If not, pad with 3's.  "
            
            frmDemo.txtPadding2.Visible = True
            frmDemo.txt3.Visible = True
            
            frmDemo.txtPadding2.BackColor = BC1
            frmDemo.txt3.BackColor = BC1
            
        Case 4
            frmDemo.txtFCC2.BackColor = BC0
            frmDemo.txtDPID2.BackColor = BC0
            frmDemo.txtPadding2.BackColor = BC0
            
            frmStep.Top = y + frmDemo.Txt4.Top + frmDemo.Txt4.Height + ydist
            frmStep.Left = x + frmDemo.Txt4.Left
            frmDemo.txtUserInfo2.BackColor = BC0
            
            'Presentation Version
            txtStep = "*  String of bar state values is broken into" & CRLF + _
                      "   triples."
            
            frmDemo.Txt4.Visible = True
            
            frmDemo.Txt4.BackColor = BC1

        Case 5
            frmDemo.txt3.BackColor = BC0
            
            frmStep.Top = y + frmDemo.txtRS.Top + frmDemo.txtRS.Height + ydist
            frmStep.Left = x + frmDemo.txtRS.Left
                        
            'Presentation Version
            
            txtStep = "*  The triples are converted into their" & CRLF + _
                      "   decimal equivalent.  " & CRLF + _
                      "*  Bar-To-Decimal conversion used.  " & CRLF + _
                      "*  Input to the Reed Solomon algorithm."
            
            frmDemo.txt5.Visible = True
            frmDemo.txtRS.Visible = True
    
            frmDemo.txt5.BackColor = BC1
   
        Case 6
            frmDemo.Txt4.BackColor = BC0
            frmDemo.txt5.BackColor = BC0
        
            frmStep.Top = y + frmDemo.txt6.Top + frmDemo.txt6.Height + ydist
            frmStep.Left = x + frmDemo.txt6.Left
            
            'Presentation Version
            txtStep = "*  4 error correction values are " & CRLF + _
                      "   generated.  " & CRLF + _
                      "*  Decimal representaion."
            
            
            frmDemo.txt6.Visible = True
            frmDemo.txt6.BackColor = BC1
    
        Case 7
            frmStep.Top = y + frmDemo.txt7.Top + frmDemo.txt7.Height + ydist
            frmStep.Left = x + frmDemo.txt7.Left + _
                        frmDemo.txt7.Width - frmStep.Width
            
            'Presentation Version
            txtStep = "*  Error correction values are converted" & CRLF + _
                      "   to bar state values.  " & CRLF + _
                      "*  Bar-To-Decimal encoding table used"
            
            
            frmDemo.txt7.Visible = True
            frmDemo.txt7.BackColor = BC1
            
        Case 8
            frmDemo.txt6.BackColor = BC0
   
            frmStep.Top = y + frmDemo.txt7.Top - frmStep.Height '- ydist
            frmStep.Left = x + frmDemo.txt7.Left + _
                        frmDemo.txt7.Width - frmStep.Width
                        
            'Presentation Text
            txtStep = "*  Error correction bar state values" & CRLF + _
                      "   appended to the existing string"
            
            frmDemo.txt8.Visible = True
            frmDemo.txt9.Visible = True
            
            frmDemo.txt8.BackColor = BC1
            frmDemo.txt9.BackColor = BC1
            
        Case 9
        
           frmDemo.txt7.BackColor = BC0
           frmStep.Top = y + frmDemo.txt8.Top - frmStep.Height '- ydist
           frmStep.Left = x + frmDemo.txt8.Left + _
                       frmDemo.txt8.Width - frmStep.Width
        
            txtStep = "*  Start and Stop bar state values added."
        
            frmDemo.txt7.Visible = True
            frmDemo.txt8.Visible = True
            frmDemo.txtStartDigits.Visible = True
            frmDemo.txtStopDigits.Visible = True
           
            
            frmDemo.txt8.BackColor = BC1
            frmDemo.txtStartDigits.BackColor = BC1
            frmDemo.txtStopDigits.BackColor = BC1
           
    
        Case 10
     
            frmDemo.txt8.BackColor = BC0
            frmDemo.txt9.BackColor = BC0
            frmDemo.txtStartDigits.BackColor = BC0
            frmDemo.txtStopDigits.BackColor = BC0

            frmStep.Top = y + frmDemo.txt7.Top - frmStep.Height '- ydist
            frmStep.Left = x + frmDemo.txt7.Left + _
                        frmDemo.txt7.Width - frmStep.Width
                        
            'Presentation text. (Ninth slide)
            txtStep = "*  Each bar state value is converted to" & CRLF + _
                      "   the associated barcode symbol."
               
            cmdNext.Visible = False
            
            frmDemo.txtBCStr.BackColor = BC1
            frmDemo.PicBC.BackColor = BC1
            
            frmDemo.txtBCStr.Visible = True
            frmDemo.PicBC.Visible = True
            
            frmDemo.txtBCStr.BackColor = BC1
            frmDemo.PicBC.BackColor = BC1
            frmDemo.DisplayBarcode (frmDemo.txtBCStr)
            
        
    End Select
End Sub


Private Sub Form_Load()
     
    'Define carriage return line feed
    Dim CRLF As String
    CRLF = Chr$(13) + Chr$(10)
 
     
    BStep = 2
    
    BC0 = &H80000005
    BC1 = &HC0FFFF
    
    frmStep.Top = frmDemo.Top + _
            frmDemo.txtFCC2.Top + frmDemo.txtFCC2.Height + 800
    frmStep.Left = frmDemo.txtFCC2.Left + frmDemo.Left
    
    txtStep = "*  FCC to bar state values.  " & CRLF + _
              "*  DPID to bar state values.  " & CRLF + _
              "*  Customer information to bar state" & CRLF + _
              "   values (if any)."
              
    frmDemo.txtFCC2.BackColor = BC1
    frmDemo.txtDPID2.BackColor = BC1
    frmDemo.txtUserInfo2.BackColor = BC1
    
End Sub


