Guidance
指路人
g.yi.org
software / rapidq / Examples / Devices / Printer & Parallel Port / selprn.bas

Register 
新用户注册
Search 搜索
首页 
Home Home
Software
Upload

  
     $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
'        OnClick = ToPrintClick
      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
'Insert your initialization code here

' Load Printer List on the ComboBox
     FOR I = 0 TO Printer.PrintersCount-1
      Select_Printer.AddItems(Printer.Printers(I))
     NEXT
     Select_Printer.ItemIndex = Printer.PrinterIndex
     Form.SHOWMODAL

'--------- Subroutines ---------

     SUB Close_FormClick (Sender AS QBUTTON)
      Form.CLOSE
     END SUB

     SUB Select_PrinterChange (Sender AS QCOMBOBOX)
      Printer.PrinterIndex = Sender.ItemIndex
     END SUB



掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Thu 2021-10-21  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2003-02-05 19:58:17