VERSION 5.00 Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX" Begin VB.Form frmTestIt Caption = "Form1" ClientHeight = 9180 ClientLeft = 60 ClientTop = 345 ClientWidth = 12420 LinkTopic = "Form1" ScaleHeight = 9180 ScaleWidth = 12420 StartUpPosition = 3 'Windows Default Begin VB.ListBox lstResults Height = 1425 ItemData = "frmTestIt.frx":0000 Left = 5400 List = "frmTestIt.frx":0002 TabIndex = 25 Top = 1680 Width = 6735 End Begin VB.ComboBox cmbScope Height = 315 Left = 6060 TabIndex = 23 Top = 8520 Visible = 0 'False Width = 1755 End Begin VB.TextBox txtSearchAttributes Height = 285 Left = 5940 TabIndex = 22 Top = 7980 Visible = 0 'False Width = 5295 End Begin VB.TextBox txtFilter Height = 285 Left = 5940 TabIndex = 21 Top = 7500 Visible = 0 'False Width = 5295 End Begin VB.CommandButton cmdEnd Caption = "End" Height = 315 Left = 8460 TabIndex = 17 Top = 8580 Width = 855 End Begin VB.TextBox txtRelPath Height = 285 Left = 2100 TabIndex = 16 Top = 1200 Width = 5235 End Begin VB.TextBox txtRootPath Height = 285 Left = 2100 TabIndex = 14 Top = 720 Width = 5235 End Begin VB.TextBox txtPassword Height = 285 IMEMode = 3 'DISABLE Left = 5220 PasswordChar = "x" TabIndex = 12 Top = 180 Width = 2115 End Begin VB.TextBox txtUser Height = 285 Left = 2100 TabIndex = 11 Top = 240 Width = 2115 End Begin VB.ComboBox cmbMethods Height = 315 Left = 720 Style = 2 'Dropdown List TabIndex = 6 Top = 1680 Width = 2715 End Begin VB.CommandButton cmdDoIt Caption = "DoIt" Height = 315 Left = 4140 TabIndex = 5 Top = 1680 Width = 795 End Begin VB.TextBox txtNewUsername Height = 285 Left = 2220 TabIndex = 2 Top = 3540 Visible = 0 'False Width = 2175 End Begin VB.TextBox txtNewUserPassword Height = 285 IMEMode = 3 'DISABLE Left = 6000 TabIndex = 1 Top = 3540 Visible = 0 'False Width = 2175 End Begin VB.TextBox txtPicturePath Height = 285 Left = 3960 TabIndex = 0 Top = 5520 Visible = 0 'False Width = 4575 End Begin MSComctlLib.ListView lvOneColProps Height = 3855 Left = 600 TabIndex = 7 Top = 4680 Visible = 0 'False Width = 2235 _ExtentX = 3942 _ExtentY = 6800 View = 2 Arrange = 1 MultiSelect = -1 'True LabelWrap = 0 'False HideSelection = -1 'True _Version = 393217 ForeColor = -2147483640 BackColor = -2147483643 BorderStyle = 1 Appearance = 1 NumItems = 0 End Begin MSComctlLib.ListView lvTwoColProps Height = 4455 Left = 600 TabIndex = 8 Top = 4320 Visible = 0 'False Width = 5235 _ExtentX = 9234 _ExtentY = 7858 View = 3 LabelWrap = -1 'True HideSelection = 0 'False FullRowSelect = -1 'True _Version = 393217 ForeColor = -2147483640 BackColor = -2147483643 BorderStyle = 1 Appearance = 1 NumItems = 0 End Begin VB.Label lblScope Caption = "Scope: " Height = 195 Left = 60 TabIndex = 24 Top = 8160 Visible = 0 'False Width = 1035 End Begin VB.Label lblSearchAttributes Caption = "Search Attr: " Height = 195 Left = 60 TabIndex = 20 Top = 7740 Visible = 0 'False Width = 1155 End Begin VB.Label lblFilter Caption = "Filter: " Height = 195 Left = 100 TabIndex = 19 Top = 7380 Visible = 0 'False Width = 1155 End Begin VB.Label lblAssumedJPEG AutoSize = -1 'True BackStyle = 0 'Transparent Caption = "Assumed JPEG Format: " BeginProperty Font Name = "MS Sans Serif" Size = 12 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H000000FF& Height = 300 Left = 6540 TabIndex = 18 Top = 4140 Visible = 0 'False Width = 2640 End Begin VB.Image imgPicture Height = 2775 Left = 6780 Stretch = -1 'True Top = 4560 Visible = 0 'False Width = 3255 End Begin VB.Label lblRelPath Caption = "RelativePath:" Height = 195 Left = 960 TabIndex = 15 Top = 1260 Width = 960 End Begin VB.Label lblRootPath Caption = "RootPath:" Height = 195 Left = 960 TabIndex = 13 Top = 720 Width = 720 End Begin VB.Label lblUser Caption = "Username:" Height = 195 Left = 960 TabIndex = 10 Top = 240 Width = 765 End Begin VB.Label lblNewUserPassword Caption = "Password:" Height = 195 Left = 4800 TabIndex = 9 Top = 3600 Visible = 0 'False Width = 915 End Begin VB.Label lblNewUsername Caption = "Username: " Height = 195 Left = 900 TabIndex = 4 Top = 3540 Visible = 0 'False Width = 1155 End Begin VB.Label lblInstruct BackStyle = 0 'Transparent Caption = "Select all items to get:" Height = 195 Left = 480 TabIndex = 3 Top = 4080 Visible = 0 'False Width = 2355 End End Attribute VB_Name = "frmTestIt" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Option Explicit ' Uses the SSTab Control to provide a group of tabs, each of which ' acts as its own container for other controls. ' Components: Microsoft Tabbed Dialog Control (SP4) ' TABCTL32.ocx ' 'Const DEFAULT_ROOT_PATH As String = "LDAP://129.6.58.40/OU=VA3000,DC=ntpc,DC=ncsl,DC=nist,DC=gov" Const DEFAULT_ROOT_PATH As String = "LDAP://129.6.58.40/CN=Veterans,DC=ntpc,DC=ncsl,DC=nist,DC=gov" Dim SmartCardCls As New SmartCard 'Dim IARBAC_GetGroupInfo As New GetGroupMembers ' Populate arrays with input from lvProperties control Dim propsPatientIndex() As PatientProperties Dim propsPatientValue() As String Dim propsCardIndex() As PatientProperties Dim propsCardValue() As String Private Sub Form_Initialize() ' Initialize the Patient and Card property arrays ' Patient Properties PatientProps(0) = "VET_GivenName" PatientProps(1) = "VET_MiddleName" PatientProps(2) = "VET_FamilyName" PatientProps(3) = "VET_SSN" PatientProps(4) = "VET_DOB" PatientProps(5) = "VET_ICN" PatientProps(6) = "VET_Picture" PatientProps(7) = "VET_PublicKey" PatientProps(8) = "VET_EncryptionKey" ' Card Properties CardProps(0) = "CARD_Location" CardProps(1) = "CARD_LocationNumber" CardProps(2) = "CARD_Station" CardProps(3) = "CARD_IssueDate" CardProps(4) = "CARD_Issuer" CardProps(5) = "CARD_Status" CardProps(6) = "CARD_Version" CardProps(7) = "CARD_Type" CardProps(8) = "CARD_Manufacturer" CardProps(9) = "CARD_ExpirationDate" CardProps(10) = "CARD_ChipID" CardProps(11) = "CARD_PassPhrase" CardProps(12) = "CARD_StatusChangeDate" CardProps(13) = "CARD_StatusChangeBy" End Sub Private Sub Form_Load() ' Establish list of methods applicable to each Tab Folder. txtRootPath.Text = DEFAULT_ROOT_PATH cmbMethods.AddItem "Set Username" cmbMethods.AddItem "Set Password" cmbMethods.AddItem "Set RootPath" cmbMethods.AddItem "Create Patient Object" cmbMethods.AddItem "Set Patient Properties" cmbMethods.AddItem "Get Patient Properties" cmbMethods.AddItem "List Patient Properties Set" cmbMethods.AddItem "List Patient Properties Unset" cmbMethods.AddItem "Create Card Object" cmbMethods.AddItem "Set Card Properties" cmbMethods.AddItem "Get Card Properties" cmbMethods.AddItem "List Card Properties Set" cmbMethods.AddItem "List Card Properties Unset" cmbMethods.AddItem "AD LDAP Query" ' Initialize and Position AD Query controls where they belong Const FILTER_CONTROLS_VERTICAL_SPACING As Integer = 500 cmbScope.AddItem "SubTree" cmbScope.AddItem "Base" cmbScope.AddItem "OneLevel" lblFilter.Left = lblNewUsername.Left lblFilter.Top = lblNewUsername.Top txtFilter.Left = txtNewUsername.Left txtFilter.Top = txtNewUsername.Top lblSearchAttributes.Left = lblFilter.Left lblSearchAttributes.Top = lblFilter.Top + FILTER_CONTROLS_VERTICAL_SPACING txtSearchAttributes.Left = txtFilter.Left txtSearchAttributes.Top = txtFilter.Top + FILTER_CONTROLS_VERTICAL_SPACING lblScope.Left = lblSearchAttributes.Left lblScope.Top = lblSearchAttributes.Top + FILTER_CONTROLS_VERTICAL_SPACING cmbScope.Left = txtSearchAttributes.Left cmbScope.Top = txtSearchAttributes.Top + FILTER_CONTROLS_VERTICAL_SPACING End Sub Private Sub cmbMethods_Click() Dim I As Integer, J As Integer resetTestingFormDisplay (Index) Select Case cmbMethods.Text ' SmartCard Patient Methods Case "Create Patient Object" lblNewUsername.Caption = "Patient Name:" txtNewUsername.Text = "" lblNewUsername.Visible = True txtNewUsername.Visible = True Case "Set Patient Properties" lblNewUsername.Caption = "Patient Name:" txtNewUsername.Text = "" ' Generate a ListView control that contains all the possible properties. setupTwoColumnHeaderLV ' Populate arrays with input from lvProperties control For I = 0 To PatientAndCardLimits.NUMBER_OF_PATIENT_PROPERTIES_MAX - 1 Set itmPropLVitem = lvTwoColProps.ListItems.Add(, , "") itmPropLVitem.SubItems(LvPropCols.Index) = PatientProps(I) Next I lblNewUsername.Visible = True txtNewUsername.Visible = True lvTwoColProps.Visible = True Case "Get Patient Properties" lblNewUsername.Caption = "Patient Name:" txtNewUsername.Text = "" lvOneColProps.ListItems.Clear lvOneColProps.MultiSelect = True ' Populate arrays with input from lvProperties control For I = 0 To PatientAndCardLimits.NUMBER_OF_PATIENT_PROPERTIES_MAX - 1 Call lvOneColProps.ListItems.Add(, , PatientProps(I)) Next I lblNewUsername.Visible = True txtNewUsername.Visible = True lvOneColProps.Visible = True txtPicturePath.Visible = True lblInstruct.Visible = True Case "List Patient Properties Set" lblNewUsername.Caption = "Patient Name:" txtNewUsername.Text = "" lblNewUsername.Visible = True txtNewUsername.Visible = True Case "List Patient Properties Unset" lblNewUsername.Caption = "Patient Name:" txtNewUsername.Text = "" lblNewUsername.Visible = True txtNewUsername.Visible = True ' SmartCard Card Methods Case "Create Card Object" lblNewUsername.Caption = "Card Name:" txtNewUsername.Text = "" lblNewUsername.Visible = True txtNewUsername.Visible = True Case "Set Card Properties" lblNewUsername.Caption = "Card Name:" txtNewUsername.Text = "" ' Generate a ListView control that contains all the possible properties. setupTwoColumnHeaderLV ' Populate arrays with input from lvProperties control For I = 0 To PatientAndCardLimits.NUMBER_OF_CARD_PROPERTIES_MAX - 1 Set itmPropLVitem = lvTwoColProps.ListItems.Add(, , "") itmPropLVitem.SubItems(LvPropCols.Index) = CardProps(I) Next I lblNewUsername.Visible = True txtNewUsername.Visible = True lvTwoColProps.Visible = True Case "Get Card Properties" lblNewUsername.Caption = "Card Name:" txtNewUsername.Text = "" lvOneColProps.ListItems.Clear lvOneColProps.MultiSelect = True ' Populate arrays with input from lvProperties control For I = 0 To PatientAndCardLimits.NUMBER_OF_CARD_PROPERTIES_MAX - 1 Call lvOneColProps.ListItems.Add(, , CardProps(I)) Next I lblNewUsername.Visible = True txtNewUsername.Visible = True lvOneColProps.Visible = True txtPicturePath.Visible = True lblInstruct.Visible = True Case "List Card Properties Set" lblNewUsername.Caption = "Card Name:" txtNewUsername.Text = "" lblNewUsername.Visible = True txtNewUsername.Visible = True Case "List Card Properties Unset" lblNewUsername.Caption = "Card Name:" txtNewUsername.Text = "" lblNewUsername.Visible = True txtNewUsername.Visible = True Case "AD LDAP Query" lblFilter.Visible = True txtFilter.Visible = True lblSearchAttributes.Visible = True txtSearchAttributes.Visible = True lblScope.Visible = True cmbScope.Visible = True End Select End Sub Private Sub cmdDoIt_Click() Dim errnoValue As Long Dim result As String Dim errnoValueResult As Long Dim results As String Dim I As Integer, J As Integer On Error GoTo ProcessError lstResults.Clear Select Case cmbMethods.Text Case "Set Username" SmartCardCls.username = txtUser.Text ' test results of operation If (SmartCardCls.username = txtUser.Text) Then Call lstResults.AddItem("Set Username Operation: SUCCESS") Else Call lstResults.AddItem("Set UserName Operation: FAILURE") End If Case "Set Password" SmartCardCls.password = txtPassword.Text ' Cannot test results of operation, since only WRITE access allowed ' Assume operation was successful. Call lstResults.AddItem("Set Password Operation: SUCCESS") Case "Set RootPath" SmartCardCls.rootPath = txtRootPath.Text ' test results of operation If (SmartCardCls.rootPath = txtRootPath.Text) Then Call lstResults.AddItem("Set RootPath Operation: SUCCESS") Else Call lstResults.AddItem("Set RootPath Operation: FAILURE") End If ' SmartCard Patient Methods Case "Create Patient Object" On Error GoTo CreatePatientObjectError Call SmartCardCls.CreatePatientObject( _ txtRelPath.Text, _ txtNewUsername.Text) Call lstResults.AddItem("Create Patient Object: SUCCESS") Exit Sub CreatePatientObjectError: Call lstResults.AddItem("Create Patient Object: FAILURE") GoTo ProcessError Case "Set Patient Properties" On Error GoTo SetPatientPropertiesError ReDim propsPatientIndex(0) ReDim Preserve propsPatientValue(0) ' Populate String arrays with inputted data from String items picked J = 0 For I = 0 To PatientAndCardLimits.NUMBER_OF_PATIENT_PROPERTIES_MAX - 1 ' Populate SetPatientProperty() DirectoryString array arguments If (lvTwoColProps.ListItems(I + 1) <> "") Then ReDim Preserve propsPatientIndex(J + 1) ReDim Preserve propsPatientValue(J + 1) propsPatientValue(J) = lvTwoColProps.ListItems(I + 1) propsPatientIndex(J) = _ PatientAndCardLimits.FIRST_PATIENT_PROPERTIES_INDEX + I J = J + 1 End If Next I Call SmartCardCls.SetPatientProperties( _ txtRelPath.Text, txtNewUsername.Text, _ propsPatientIndex, _ propsPatientValue) Call lstResults.AddItem("Set Patient Properties: SUCCESS") Exit Sub SetPatientPropertiesError: Call lstResults.AddItem("Set Patient Properties: FAILURE") GoTo ProcessError Case "Get Patient Properties" On Error GoTo GetPatientPropertiesError ' Populate arrays with selected lvTwoColProps entries J = 0 For I = 0 To PatientAndCardLimits.NUMBER_OF_PATIENT_PROPERTIES_MAX - 1 ' Populate SetPatientProperty() array arguments If (lvOneColProps.ListItems(I + 1).Selected = True) Then ReDim Preserve propsPatientIndex(J + 1) ReDim Preserve propsPatientValue(J + 1) propsPatientIndex(J) = _ PatientAndCardLimits.FIRST_PATIENT_PROPERTIES_INDEX + I If (I = PatientProperties.VET_Picture _ - PatientAndCardLimits.FIRST_PATIENT_PROPERTIES_INDEX) Then ' Obtain Path to store Picture If ((Len(txtPicturePath.Text) > 3) And _ (Mid$(txtPicturePath.Text, 2, 1) = ":")) Then propsPatientValue(J) = txtPicturePath.Text End If End If J = J + 1 End If Next I Call SmartCardCls.GetPatientProperties( _ txtRelPath.Text, txtNewUsername.Text, _ propsPatientIndex, _ propsPatientValue) Call lstResults.AddItem("Get Patient Properties: SUCCESS") ' Provide results of Get Call setupTwoColumnHeaderLV J = 0 For I = 0 To PatientAndCardLimits.NUMBER_OF_PATIENT_PROPERTIES_MAX - 1 If (lvOneColProps.ListItems(I + 1).Selected = True) Then If (I = PatientProperties.VET_Picture _ - PatientAndCardLimits.FIRST_PATIENT_PROPERTIES_INDEX) Then ' Obtain location of obtained Picture If ((Len(txtPicturePath.Text) > 3) And _ (Mid$(txtPicturePath.Text, 2, 1) = ":")) Then imgPicture.Picture = LoadPicture(txtPicturePath.Text) Else ' LoadPicture() only supports generating an IPictureDisp Type ' from a filename. So store data in file. ' Must restrict file type to that of filename suffix. Dim pictureFile() As Byte ReDim pictureFile(Len(propsPatientValue(J)) * 2) Call CopyMem(pictureFile(0), ByVal StrPtr(propsPatientValue(J)), _ Len(propsPatientValue(J)) * 2) Const TMP_FILENAME As String = "c:\tmp\TempFileForSmartCard.gif" ' Generate new file containing the Image in the path ' specified by the user. Open TMP_FILENAME For Binary Access Write As #1 Put #1, , pictureFile() ' write Image file Close #1 imgPicture.Picture = LoadPicture(TMP_FILENAME) lblAssumedJPEG.Visible = True End If Set itmPropLVitem = _ lvTwoColProps.ListItems.Add(, , "See Image at Right") imgPicture.Visible = True Else Set itmPropLVitem = _ lvTwoColProps.ListItems.Add(, , propsPatientValue(J)) End If itmPropLVitem.SubItems(LvPropCols.Index) = PatientProps(I) J = J + 1 End If Next I lvOneColProps.Visible = False txtPicturePath.Visible = False lblInstruct.Visible = False lvTwoColProps.Visible = True Exit Sub GetPatientPropertiesError: Call lstResults.AddItem("Get Patient Properties: FAILURE") GoTo ProcessError Case "List Patient Properties Set" On Error GoTo ListPatientPropertiesSetError result = SmartCardCls.ListPatientPropertiesSet( _ txtRelPath.Text, txtNewUsername.Text) Call lstResults.AddItem("List Patient Properties Set: SUCCESS") Call showResultsInListBox(result, lstResults) Exit Sub ListPatientPropertiesSetError: Call lstResults.AddItem("List Patient Properties Set: FAILURE") Case "List Patient Properties Unset" On Error GoTo ListPatientPropertiesUnSetError result = SmartCardCls.ListPatientPropertiesUnset( _ txtRelPath.Text, txtNewUsername.Text) Call lstResults.AddItem("List Patient Properties Unset: SUCCESS") Call showResultsInListBox(result, lstResults) Exit Sub ListPatientPropertiesUnSetError: Call lstResults.AddItem("List Patient Properties Unset: FAILURE") ' SmartCard Card Methods Case "Create Card Object" On Error GoTo CreateCardObjectError Call SmartCardCls.CreateCardObject( _ txtRelPath.Text, _ txtNewUsername.Text) Call lstResults.AddItem("Create Card Object: SUCCESS") Exit Sub CreateCardObjectError: Call lstResults.AddItem("Create Card Object: FAILURE") GoTo ProcessError Case "Set Card Properties" On Error GoTo SetCardPropertiesError ReDim propsCardIndex(0) ReDim Preserve propsCardValue(0) ' Populate String arrays with inputted data from String items picked J = 0 For I = 0 To PatientAndCardLimits.NUMBER_OF_CARD_PROPERTIES_MAX - 1 ' Populate SetCardProperty() DirectoryString array arguments If (lvTwoColProps.ListItems(I + 1) <> "") Then ReDim Preserve propsCardIndex(J + 1) ReDim Preserve propsCardValue(J + 1) propsCardValue(J) = lvTwoColProps.ListItems(I + 1) propsCardIndex(J) = _ PatientAndCardLimits.FIRST_Card_PROPERTIES_INDEX + I J = J + 1 End If Next I Call SmartCardCls.SetCardProperties( _ txtRelPath.Text, txtNewUsername.Text, _ propsCardIndex, _ propsCardValue) Call lstResults.AddItem("Set Card Properties: SUCCESS") Exit Sub SetCardPropertiesError: Call lstResults.AddItem("Set Card Properties: FAILURE") GoTo ProcessError Case "Get Card Properties" On Error GoTo GetCardPropertiesError ' Populate arrays with selected lvTwoColProps entries J = 0 For I = 0 To PatientAndCardLimits.NUMBER_OF_CARD_PROPERTIES_MAX - 1 ' Populate SetCardProperty() array arguments If (lvOneColProps.ListItems(I + 1).Selected = True) Then ReDim Preserve propsCardIndex(J + 1) ReDim Preserve propsCardValue(J + 1) propsCardIndex(J) = _ PatientAndCardLimits.FIRST_Card_PROPERTIES_INDEX + I J = J + 1 End If Next I Call SmartCardCls.GetCardProperties( _ txtRelPath.Text, txtNewUsername.Text, _ propsCardIndex, _ propsCardValue) Call lstResults.AddItem("Get Card Properties: SUCCESS") ' Provide results of Get Call setupTwoColumnHeaderLV J = 0 For I = 0 To PatientAndCardLimits.NUMBER_OF_CARD_PROPERTIES_MAX - 1 If (lvOneColProps.ListItems(I + 1).Selected = True) Then Set itmPropLVitem = _ lvTwoColProps.ListItems.Add(, , propsCardValue(J)) itmPropLVitem.SubItems(LvPropCols.Index) = CardProps(I) J = J + 1 End If Next I lvOneColProps.Visible = False txtPicturePath.Visible = False lblInstruct.Visible = False lvTwoColProps.Visible = True Exit Sub GetCardPropertiesError: Call lstResults.AddItem("Get Card Properties: FAILURE") GoTo ProcessError Case "List Card Properties Set" On Error GoTo ListCardPropertiesSetError result = SmartCardCls.ListCardPropertiesSet( _ txtRelPath.Text, txtNewUsername.Text) Call lstResults.AddItem("List Card Properties Set: SUCCESS") Call showResultsInListBox(result, lstResults) Exit Sub ListCardPropertiesSetError: Call lstResults.AddItem("List Card Properties Set: FAILURE") Case "List Card Properties Unset" On Error GoTo ListCardPropertiesUnSetError result = SmartCardCls.ListCardPropertiesUnset( _ txtRelPath.Text, txtNewUsername.Text) Call lstResults.AddItem("List Card Properties Unset: SUCCESS") Call showResultsInListBox(result, lstResults) Exit Sub ListCardPropertiesUnSetError: Call lstResults.AddItem("List Card Properties Unset: FAILURE") Case "AD LDAP Query" On Error GoTo AdLdapQueryError Dim scope As Long Select Case cmbScope.Text Case "SubTree" scope = ScopeOfQuery.SubTree Case "Base" scope = ScopeOfQuery.Base Case "OneLevel" scope = ScopeOfQuery.OneLevel End Select result = SmartCardCls.doADsearchViaLdapQuery( _ txtRelPath.Text, txtFilter.Text, _ txtSearchAttributes.Text, scope) Call lstResults.AddItem("AD LDAP Query: SUCCESS") Call showResultsInListBox(result, lstResults) Exit Sub AdLdapQueryError: Call lstResults.AddItem("AD LDAP Query: FAILURE") Case Else End Select Exit Sub ProcessError: Call MsgBox("Error Number: " & Err.Number & vbCrLf & _ "Description: " & Err.Description & vbCrLf & _ "Source: " & Err.Source, vbCritical, "Error Detected") End Sub Private Sub cmdEnd_Click() Unload frmTestIt End Sub ' Reset the Testing Tab to hide any extra controls that may be displayed Private Sub resetTestingFormDisplay(Index As Integer) lstResults.Clear ' reset results for new method selection lblNewUsername.Visible = False txtNewUsername.Visible = False lblNewUserPassword.Visible = False txtNewUserPassword.Visible = False lblInstruct.Visible = False lvTwoColProps.Visible = False lvOneColProps.Visible = False txtPicturePath.Visible = False imgPicture.Visible = False imgPicture.Picture = Nothing ' Free memory used by Image lblAssumedJPEG.Visible = False lblFilter.Visible = False txtFilter.Visible = False lblSearchAttributes.Visible = False txtSearchAttributes.Visible = False lblScope.Visible = False cmbScope.Visible = False End Sub Private Sub setupTwoColumnHeaderLV() Dim I As Integer ' Generate a two column ListView control that contains all the possible Patient properties. lvTwoColProps.ListItems.Clear lvTwoColProps.ColumnHeaders.Clear lvTwoColProps.Refresh lvTwoColProps.MultiSelect = False itmPropLVtable = "Properties" Set clmPropTable = lvTwoColProps.ColumnHeaders.Add(, , "Property Value of", _ (lvTwoColProps.Width / LISTVIEWPROP_COLUMNS) * 1) Set clmPropTable = lvTwoColProps.ColumnHeaders.Add(, , "Name Index", _ (lvTwoColProps.Width / LISTVIEWPROP_COLUMNS) * 1) End Sub Private Sub showResultsInListBox(result As String, lstResults As ListBox) Dim splitArray As Variant Dim resultSubItem As Variant splitArray = Split(result, "^", -1, vbBinaryCompare) For Each resultSubItem In splitArray Call lstResults.AddItem(CStr(resultSubItem)) Next End Sub