您好,我创建从我的应用条码使用一些类的,其做工精细,
但我我的条形码转换成图像文件格式,我这样做的时候,它不是通过条形码阅读器读取,
但如果我的条码是在文本文件,条形码阅读器读取的罚款相同的数据
我不知道如何解决这个问题,请让我知道您的想法和一些示例代码
这是我的条码图像格式转换的代码; Color BackColor = Color.White;
String FontName = "IDAutomationSC128M DEMO";
string Fontaname1 = "ARIAL";
int FontSize = 11;
int fontSize1 = 8;
int Height2 = 80;
int Width2 = 175;
string a,b,c;
IDAutomationBarcodeObject = new clsBarCode();
a = IDAutomationBarcodeObject.Code128(txtEnter.Text, true);
b = "Some Sample Name";
c = "Product Description";
Bitmap bitmap = new Bitmap(Width2, Height2);
Graphics graphics = Graphics.FromImage(bitmap);
Color color = Color.Gray; ;
Font font = new Font(FontName, FontSize);
Font Font1 = new Font(Fontaname1, fontSize1);
SolidBrush BrushBackColor = new SolidBrush(BackColor);
Pen BorderPen = new Pen(color);
Rectangle displayRectangle1 = new Rectangle(new Point(0, 0), new Size(Width2 - 1, Height2 - 2));
graphics.FillRectangle(BrushBackColor, displayRectangle1);
graphics.DrawString(b, Font1, Brushes.Black, 0, 0);
graphics.DrawString(a, font, Brushes.Black, 4, 15);
graphics.DrawString(c, Font1, Brushes.Black, 0, 63);
pictureBox1.Image = bitmap;
bitmap.Save("c:\\button11.bmp", System.Drawing.Imaging.ImageFormat.Bmp);