不知道下面的代码有什么问题,出现的打印设置对话框中打印机选择按钮为不可用
private void mbPrintSet_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
try
{
PageSetupDialog psDlg = new PageSetupDialog() ;
PageSettings ps = null ;
if (ps == null)
{
ps = new PageSettings();
}
psDlg.PageSettings = ps ;
DialogResult dr=psDlg.ShowDialog();
if (dr==DialogResult.OK)
{
ps=psDlg.PageSettings;
useIni.IniWriteValue("PRINTER","MarkUpSheet",ps.PrinterSettings.PrinterName);
}
}
catch(Exception ex)
{
MessageBox.Show("An error occurred - " + ex.Message);
}
}
private void mbPrintSet_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
try
{
PageSetupDialog psDlg = new PageSetupDialog() ;
PageSettings ps = null ;
if (ps == null)
{
ps = new PageSettings();
}
psDlg.PageSettings = ps ;
DialogResult dr=psDlg.ShowDialog();
if (dr==DialogResult.OK)
{
ps=psDlg.PageSettings;
useIni.IniWriteValue("PRINTER","MarkUpSheet",ps.PrinterSettings.PrinterName);
}
}
catch(Exception ex)
{
MessageBox.Show("An error occurred - " + ex.Message);
}
}
另外,PageSetupDialog在计量单位换算存在BUG,在中文操作系统下,必须人工处理所有的尺寸