如何写一段斑马条码打印程序,在斑马条码打印机上运行程序 对此领域一窍不通,还请高手赐教.能给代码!!! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用第三方控件,我有实例,请联系[email protected] private void vistaButton1_Click(object sender, EventArgs e) { PrintDocument pd = new PrintDocument(); pd.PrintPage += new PrintPageEventHandler(pd_PrintPage); PrintPreviewDialog cppd = new PrintPreviewDialog(); cppd.Document = pd; cppd.ShowDialog(); } void pd_PrintPage(object sender, PrintPageEventArgs e) { Graphics g = e.Graphics; Rectangle rect = barcodeControl2.ClientRectangle; //下面是调整打印位置的代码。 rect = new Rectangle(rect.X + (int)numericUpDown2.Value, rect.Y + (int)numericUpDown3.Value, rect.Width, rect.Height); //打印 barcodeControl2.Draw(g, rect, GraphicsUnit.Inch, 0.01f, 0, null); g.Dispose(); }using Cobainsoft.Windows.Forms;在工具栏,加入dll,然后就可以拖到form上. system.timers.timer问题 奇怪,导入QuartzTypeLib,别的接口函数都有,就唯独没有ISampleGrabber和IVideoFrameStep两个接口函数,为什么? 关于右下角弹窗体 数据库远程备份 数据库链接出问题拉! 修改系统时间的问题 在InstallShield x 中如何打包dotnetfx 1.1 在DataGridz中,离开前的事件! 很想学C#,请给些较好的学习路径,不甚感激! {求助}C# sqlserver2005 网络连接 问题!非局域网 100分求解更新datagridview的问题 请推荐
private void vistaButton1_Click(object sender, EventArgs e)
{
PrintDocument pd = new PrintDocument();
pd.PrintPage += new PrintPageEventHandler(pd_PrintPage);
PrintPreviewDialog cppd = new PrintPreviewDialog();
cppd.Document = pd;
cppd.ShowDialog();
} void pd_PrintPage(object sender, PrintPageEventArgs e)
{
Graphics g = e.Graphics;
Rectangle rect = barcodeControl2.ClientRectangle;
//下面是调整打印位置的代码。
rect = new Rectangle(rect.X + (int)numericUpDown2.Value, rect.Y + (int)numericUpDown3.Value, rect.Width, rect.Height);
//打印
barcodeControl2.Draw(g, rect, GraphicsUnit.Inch, 0.01f, 0, null);
g.Dispose();
}
using Cobainsoft.Windows.Forms;
在工具栏,加入dll,然后就可以拖到form上.