日期:2014-05-18 浏览次数:20810 次
Bitmap memorybitmap; private void button1_Click(object sender, EventArgs e) { Graphics g = axBarCodeCtrl1.CreateGraphics(); memorybitmap = new Bitmap(axBarCodeCtrl1.Size.Width, axBarCodeCtrl1.Size.Height, g); g = Graphics.FromImage(memorybitmap); g.CopyFromScreen(this.Location.X, this.Location.Y, 0, 0, this.Size); memorybitmap.Save(@"d:\Barcode\b.bmp");//保存为图片 }
Graphics g = axBarCodeCtrl1.CreateGraphics(); axBarCodeCtrl1.DrawToBitmap(BP, new Rectangle(0, 0, axBarCodeCtrl1.Width, axBarCodeCtrl1.Height)); Point ptCTScreen = axBarCodeCtrl1.PointToScreen(axBarCodeCtrl1.Location); G.CopyFromScreen(ptCTScreen, new Point(axBarCodeCtrl1.Location.X, axBarCodeCtrl1.Location.Y), axBarCodeCtrl1.Size);
------解决方案--------------------
memorybitmap = BP;
这个意思