100分问个打印预览(PrintPreviewDialog)的问题! PrintPreviewDialog.dialog()弹出的打印预览框左上角有个打印的按钮,如何把他禁掉?或者能捕获那个按钮的事件再进行处理也行!. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 声明:由于.Net版本升级导致以下代码不能用,我不负责...... PrintPreviewDialog dlg = new PrintPreviewDialog(); dlg.Document = m_PrintDoc; foreach (Control ctl in dlg.Controls) { if (ctl is ToolStrip) { ToolStrip toolbar = ctl as ToolStrip; toolbar.Items.RemoveAt(0); } } dlg.Show(); 按钮自定义PrintPreviewDialog p = new PrintPreviewDialog(); if(p.Controls.ContainsKey( "toolStrip1 ")) { ToolStrip ts = p.Controls[ "toolStrip1 "] as ToolStrip; foreach(ToolStripItem item in ts.Items) { Console.WriteLine(item.Name); } if(ts.Items.ContainsKey("")) { ts.Items[""].Visible = false; } } p.ShowDialog(this); 回复jointan:是否能捕获点击打印预览上面的打印按钮的事件. 打印功能。 如何让程序,等待某个事件完成后再执行 散分了,来点线程或移动通信方面编程的资料 循环整个控件代码该如何写 .net winform 程序 调用外部程序 owc11制作图表问题,高手请进 导入excel时程序出错,求助! 请问在C#下如何像ASP.NET中一样能用Response.End();来结束语句呢? 有关font的使用方法,求助!!!! 编应用程序用vc.net好还是c#好,编游戏用那个好? vs 2010 能和SQL 2005一起用吗? C#时间问题
PrintPreviewDialog dlg = new PrintPreviewDialog();
dlg.Document = m_PrintDoc;
foreach (Control ctl in dlg.Controls)
{
if (ctl is ToolStrip)
{
ToolStrip toolbar = ctl as ToolStrip;
toolbar.Items.RemoveAt(0);
}
}
dlg.Show();
PrintPreviewDialog p = new PrintPreviewDialog();
if(p.Controls.ContainsKey( "toolStrip1 "))
{
ToolStrip ts = p.Controls[ "toolStrip1 "] as ToolStrip;
foreach(ToolStripItem item in ts.Items)
{
Console.WriteLine(item.Name);
}
if(ts.Items.ContainsKey(""))
{
ts.Items[""].Visible = false;
}
}
p.ShowDialog(this);