C♯相談室 Part14
■ このスレッドは過去ログ倉庫に格納されています
0170デフォルトの名無しさん
NGNGすみません。ページ設定ダイアログで設定した余白等はどうしたら反映されるのでしょうか?
以下のコードだけではダメなんです。(VS2003)
private void button1_Click(object sender, System.EventArgs e)
{
DialogResult result;
pageSetupDialog1.PageSettings=new System.Drawing.Printing.PageSettings();
result=pageSetupDialog1.ShowDialog();
if(result==DialogResult.OK)
printDocument1.Print();
}
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawString("VC#NET",new Font("Arial",16),Brushes.Black,e.MarginBounds.Left,e.MarginBounds.Top,new StringFormat());
e.HasMorePages=false;
}
■ このスレッドは過去ログ倉庫に格納されています