
/// <summary>
/// 打印绘制
/// </贺漏summary>
/// <param name="e"></param>枣尘
protected override void OnPrintPage(PrintPageEventArgs e)
{
base.OnPrintPage(e)
if (printBitmap != null)
{
int width = printBitmapRectangle.Width >e.MarginBounds.Width ? e.MarginBounds.Width : printBitmapRectangle.Width
int height = printBitmapRectangle.Height >e.MarginBounds.Height ? e.MarginBounds.Height : printBitmapRectangle.Height
e.Graphics.DrawImage(printBitmap, new Rectangle(e.MarginBounds.Left, e.MarginBounds.Top, width, height), new Rectangle(0, 0, printBitmap.Width, printBitmap.Height), GraphicsUnit.Pixel)
}
if (printString != "")
e.Graphics.DrawString(printString, new Font("宋体", 12), new SolidBrush(Color.Black), printStringLocation)
}
/// <summary>
/// 启动打印
/// </summary>
public void OnPrint()
{
if (printBitmap == null) { MessageBox.Show("请先加载图片")return}
if (!this.PrinterSettings.IsValid) { MessageBox.Show("无法识别打印机")return}
if (MessageBox2.Show("确定打印吗?", "打印", MessageBoxButtons2.OKCancel) == DialogResult.OK)
{
this.Print()
}
}
这个是我以前写的,现在也忘了,你看下,自己研究下,打印图片的功能
1、LBL文件是NiceLabel创建的LABEL标签模版文件,NiceLabel是创建专业条形码或是RFID标签文件,包含一个默认的布局和设计,包括尺寸、格式、文本和模板部分。LBL文件可和困桥以从简单模版打唤猛印出许多标签,在打印的时候,有可能会被填上日尺橡期或是一些数据信息。
2、打开方式:用Microsoft
Visual
FoxPro直接打开。
3、1.dBASE
IV
-
2.Clipper
5
-
3.dBFast这三种也可以打开的
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)