VERSION 5.00
Object = "{E48EFDBF-5838-4A7D-95DD-BC0EC914BD4A}#1.2#0"; "StarCEComponents.ocx"
Begin VB.Form Form1 
   Caption         =   "EnumPrintersSample"
   ClientHeight    =   3240
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   ScaleHeight     =   3240
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
   Begin StarCEComponents.EnumPrinters EnumPrinters1 
      Height          =   1095
      Left            =   840
      TabIndex        =   5
      Top             =   3480
      Width           =   3015
      _ExtentX        =   5318
      _ExtentY        =   1931
   End
   Begin VB.ListBox List1 
      Height          =   1425
      Left            =   120
      TabIndex        =   3
      Top             =   960
      Width           =   4455
   End
   Begin StarCEComponents.ConfigurationHandler ConfigurationHandler1 
      Left            =   0
      Top             =   2640
      _ExtentX        =   1931
      _ExtentY        =   873
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Refresh"
      Height          =   375
      Left            =   3360
      TabIndex        =   2
      Top             =   2760
      Width           =   1215
   End
   Begin VB.TextBox Text1 
      Height          =   285
      Left            =   1920
      TabIndex        =   1
      Text            =   "Star TSP100 Cutter (TSP143)"
      Top             =   120
      Width           =   2655
   End
   Begin VB.Label Label2 
      Caption         =   "Printer List:"
      Height          =   255
      Left            =   120
      TabIndex        =   4
      Top             =   600
      Width           =   2535
   End
   Begin VB.Label Label1 
      Caption         =   "Printer Queue Name:"
      Height          =   255
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   1695
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
    RefreshList
End Sub

Private Sub RefreshList()
    Dim i As Integer
    
    List1.Clear
    
    ' Create a loop running from zero to the number of items in the
    ' internal EnumPrinters list, and add each item to our list
    For i = 0 To EnumPrinters1.ListCount - 1
        List1.AddItem EnumPrinters1.GetPrinterName(i)
    Next i
End Sub
