EExcel 丞燕快速查詢2

EExcel 丞燕快速查詢2
EExcel 丞燕快速查詢2 https://sandk.ffbizs.com/

c# not vb.net PrintPreviewDialog PrintDialog 在PreviewDialog中按列印鈕,直接呼叫PrintDialog

http://www.blueshop.com.tw/board/FUM20050124191756KKC/BRD200707131926393KJ.html
http://homepage1.nifty.com/yamato/texts/memorandum/memo5_1.html



Globa
private ToolStripButton tbs = new ToolStripButton();


private void preview_Click(object sender, EventArgs e)  //normal buttion click
{
  tbs.Text = "Print";
  tbs.Click += new EventHandler(tbs_Click);

  PrintPreviewDialog print_preview = new PrintPreviewDialog();
  ((ToolStripButton)((ToolStrip)print_preview.Controls[1]).Items[0]).Visible = false;
  ((ToolStrip)print_preview.Controls[1]).Items.Insert(0, tbs);

  print_preview.Document = printDocument1;  //PrintPreviewDialog
  print_preview.ShowDialog();
}

private void tbs_Click(object sender, EventArgs e) {
  MessageBox.Show("dd");  //now here can put PrintDialog code

  var print_dialog = new PrintDialog();
  print_dialog.Document = printDocument1;

  if (print_dialog.ShowDialog() == DialogResult.OK)
  {
      printDocument1.Print();
  }
}






c#打印

http://www.cnblogs.com/scottckt/archive/2008/01/31/1059576.html

http://kenyanzi.blogspot.tw/2011/05/c.html

http://fanli7.net/a/bianchengyuyan/_NET/20130427/347677.html

http://stackoverflow.com/questions/25069994/use-printdocument-to-print-each-row-in-datatable-to-seperate-page