$INCLUDE "RAPIDQ.INC"
DECLARE SUB Select_PrinterChange (Sender AS QCOMBOBOX)
DECLARE SUB Close_formClick
CREATE Form AS QFORM
CAPTION = "change printer"
Width = 737
Height = 486
Center
Font.COLOR = &HFF0000
CREATE ToPrint AS QBUTTON
CAPTION = "&Print"
Left = 650
Top = 147
Width = 91
TabOrder = 4
END CREATE
CREATE Close_Form AS QBUTTON
CAPTION = "&Close"
Left = 650
Top = 184
Width = 91
TabOrder = 5
OnClick = Close_FormClick
END CREATE
CREATE Select_Printer AS QCOMBOBOX
Text = "Printers"
Left = 415
Top = 150
Width = 201
TabOrder = 6
OnChange = Select_PrinterChange
END CREATE
END CREATE
FOR I = 0 TO Printer.PrintersCount-1
Select_Printer.AddItems(Printer.Printers(I))
NEXT
Select_Printer.ItemIndex = Printer.PrinterIndex
Form.SHOWMODAL
SUB Close_FormClick (Sender AS QBUTTON)
Form.CLOSE
END SUB
SUB Select_PrinterChange (Sender AS QCOMBOBOX)
Printer.PrinterIndex = Sender.ItemIndex
END SUB
|