منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : vb.net code
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
i need vb.net code for barcode print but not as image . can any one help
Barcode not detected through barcode scanner after printing

PHP كود :
string Barcode "*"+txtCode.Text+"*";
 
           string price txtPprice.Text;
 
           string pname txtPname.Text;

 
           using (Bitmap bitmap = new Bitmap(350220))
 
           {
 
               bitmap.SetResolution(240240);
 
               using (Graphics graphics Graphics.FromImage(bitmap))
 
               {
 
                   Font font = new Font("IDAutomationHC39M"10FontStyle.RegularGraphicsUnit.Point);

 
                   graphics.Clear(Color.White);
 
                   StringFormat stringformat = new StringFormat(StringFormatFlags.NoWrap);
 
                   graphics.TextRenderingHint TextRenderingHint.AntiAliasGridFit;
 
                   graphics.TextContrast 10;
 
                   SolidBrush black = new SolidBrush(Color.Black);
 
                   SolidBrush white = new SolidBrush(Color.White);
 
                   PointF TextPosition = new PointF(45F10F);
 
                   SizeF TextSize graphics.MeasureString(BarcodefontTextPositionstringformat);
 
                   PointF pointPrice = new PointF(90f125f);
 
                   Font newfont2 = new Font("Cambria"8FontStyle.RegularGraphicsUnit.Point);
 
                   Font newfont3 = new Font("Arial Black"10FontStyle.RegularGraphicsUnit.Point);
 
                   graphics.DrawString("" pname ""newfont3blackpointPrice);
 
                   PointF pointPname = new PointF(200f170f);
 
                   graphics.DrawString("" price " L.E."newfont3blackpointPname);
 
                   PointF pointBcode = new PointF(35f170f);
 
                   graphics.DrawString("" Barcode ""newfont2blackpointBcode);
 
                   if (TextSize.Width bitmap.Width)
 
                   {
 
                       float ScaleFactor = (bitmap.Width - (TextPosition.2)) / TextSize.Width;
 
                       graphics.InterpolationMode InterpolationMode.HighQualityBicubic;
 
                       graphics.ScaleTransform(ScaleFactorScaleFactor);
 
                   }

 
                   graphics.DrawString(Barcodefont, new SolidBrush(Color.Black), TextPositionStringFormat.GenericTypographic);

 
                   bitmap.Save(@"barcode.png"ImageFormat.Png);
 
                   this.pictureBox1.Image = (Bitmap)bitmap.Clone();
 
                   font.Dispose();
 
               }