C
CompuTechSide
Guest
I want to create bitmap save automatically in drive path and open its self in MSpaint i have
applied this
public object BitmapImage()
{
string text = MenufecturerImage;
var bitmap = new Bitmap(1, 1);
var font = PictureBox1(Conversions.ToSingle(20), FontStyle.Regular);
var graphics = Graphics.FromImage(bitmap);
int width = Conversions.ToInteger(graphics.MeasureString(text, font).Width);
bitmap = new Bitmap(bitmap, new Size(width, height));
graphics = Graphics.FromImage(bitmap);
graphics.Clear(Color.White);
graphics.SmoothingMode = SmoothingMode.HighQuality;
graphics.TextRenderingHint = TextRenderingHint.AntiAliasGridFit;
graphics.DrawString(text, font, new SolidBrush(Color.FromArgb(0, 0, 0)), 0, 0);
graphics.Flush();
graphics.Dispose();
string fileName = "StreamReader" + ".bmp";
bitmap.Save(FileSystem.CurDir() + @"\" + fileName, ImageFormat.Bmp);
OpenInMsPaint();
return default(object);
}
public object BarcodeImageOpenInMsPaint()
{
var Proc = new Process();
string BitmapPath = "StreamReader.bmp";
string ImgPath = FileSystem.CurDir() + @"\" + BitmapPath;
string MSPPath = @"C:\Windows\System32\mspaint.exe";
Proc.StartInfo.FileName = MSPPath;
Proc.StartInfo.Arguments = ImgPath;
Proc.Start();
return default(object);
}
Continue reading...
applied this
public object BitmapImage()
{
string text = MenufecturerImage;
var bitmap = new Bitmap(1, 1);
var font = PictureBox1(Conversions.ToSingle(20), FontStyle.Regular);
var graphics = Graphics.FromImage(bitmap);
int width = Conversions.ToInteger(graphics.MeasureString(text, font).Width);
bitmap = new Bitmap(bitmap, new Size(width, height));
graphics = Graphics.FromImage(bitmap);
graphics.Clear(Color.White);
graphics.SmoothingMode = SmoothingMode.HighQuality;
graphics.TextRenderingHint = TextRenderingHint.AntiAliasGridFit;
graphics.DrawString(text, font, new SolidBrush(Color.FromArgb(0, 0, 0)), 0, 0);
graphics.Flush();
graphics.Dispose();
string fileName = "StreamReader" + ".bmp";
bitmap.Save(FileSystem.CurDir() + @"\" + fileName, ImageFormat.Bmp);
OpenInMsPaint();
return default(object);
}
public object BarcodeImageOpenInMsPaint()
{
var Proc = new Process();
string BitmapPath = "StreamReader.bmp";
string ImgPath = FileSystem.CurDir() + @"\" + BitmapPath;
string MSPPath = @"C:\Windows\System32\mspaint.exe";
Proc.StartInfo.FileName = MSPPath;
Proc.StartInfo.Arguments = ImgPath;
Proc.Start();
return default(object);
}
Continue reading...