| タイトル | : 用紙トレイの変更 |  
| 記事No | : 5493 |  
| 投稿日 | : 2007/05/16(Wed) 12:11 |  
| 投稿者 | : のっぽ  |  
 のっぽと申します。 プリンタ 用紙トレイを変更できるプログラムを作成中です。
  Windows XP SP2 VB2005 Express Edition プリンタ=HPC5180
 
  HPC5180 は 用紙トレイが2つあり、 Printing.PrinterSettings.PaperSources()を調べると下記の通りでした。 0=[PaperSource  自動選択 Kind=FormSource] 1=[PaperSource  メイントレイ Kind=Custom] 2=[PaperSource  フォトトレイ Kind=Custom]
  [PaperSource  フォトトレイ Kind=Custom]に用紙トレイを変更し A6や葉書サイズの用紙を印字するプログラムを作成中です。 このコードでは、メイントレイからフォトトレイに変更されません。 どのようにすれば 良いのでしょうか?
  お手数かけますが、ご協力をよろしくお願いします。
      Private Sub cmdPrint_Click(ByVal sender As System.Object, ByVal e As   SYStem.EventArgs)  Handles cmdPrint.Click                 Dim I As Integer         Dim Pset As New Printing.PrinterSettings         Dim Psize As Printing.PaperSize                  'フォトトレイを指定             I =2             PrintDocument1.DefaultPageSettings.PaperSource = Pset.PaperSources(I)
          '用紙サイズ 方向を指定       PrintDocument1.DefaultPageSettings.Landscape = False            For Each Psize In Pset.PaperSizes             If Psize.Kind = Printing.PaperKind.A6 Then                PrintDocument.DefaultPageSettings.PaperSize = Psize             End If         Next        PrintDocument1.Print()     End Sub  
 
 |