您好
我对C#Windows应用工作,在打印按钮,如果我点击打印按钮,打印机的路径,在ini文件,当我试图运行显示错误
下面我米代码
如果可能的话,请帮助 private void btnPrinter_Click(object sender, EventArgs e)
{
private printcon pObj = new printcon() //Here "printcon" is a class file//
private OdbcConnection connPrt = new OdbcConnection();
connPrt = new OdbcConnection(pObj.connection()); //Format of the initialization string does not conform to specification starting at index 0.//
PrintDocument doc = new PrintDocument();
doc.PrinterSettings.PrinterName = Convert.ToString(connPrt);
doc.PrintPage += this.doc_PrintPage;
PrintDialog dlgSettings = new PrintDialog();
dlgSettings.Document = doc;
doc.Print();
}
感谢问候
indrajit达斯古普塔