Private Sub Command1_Click() '设置打印机 If List1.ListIndex >= 0 Then Set Printer = Printers(List1.ListIndex) Unload Me
End Sub
Private Sub Form_Activate() '显示打印机列表 Dim X As Printer For Each X In Printers List1.AddItem X.DeviceName If Printer.DeviceName = X.DeviceName Then List1.ListIndex = i i = i + 1 Next