private void printDoc_PrintPage(object sender, PrintPageEventArgs e)
        {
            ColumnHeaderStyle c = new ColumnHeaderStyle();

            lvTinhThanh.HeaderStyle = ColumnHeaderStyle.Nonclickable;
            ControlPrint ctrP = new ControlPrint(lvTinhThanh, true);

            ctrP.PrintWidth  = ctrP.CalculateSize().Width;
            ctrP.PrintHeight = ctrP.CalculateSize().Height;
            e.Graphics.DrawString("DANH SÁCH NHÓM THUỐC", new Font("Tahoma", 16), Brushes.Black, new PointF(40, 40));
            e.Graphics.DrawImageUnscaled(ctrP.GetBitmap(), new Point(100, 100));
            e.Graphics.DrawString("STT", new Font("Arial", 11), Brushes.Black, new PointF(100, 100));
            e.Graphics.DrawString("Tên", new Font("Arial", 11), Brushes.Black, new PointF(160, 100));
            e.Graphics.DrawString("Mô tả", new Font("Arial", 11), Brushes.Black, new PointF(500, 100));
        }
        private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
        {
            ColumnHeaderStyle c = new ColumnHeaderStyle();

            lvHD.HeaderStyle = ColumnHeaderStyle.Nonclickable;
            ControlPrint ctrP = new ControlPrint(lvHD, true);

            ctrP.PrintWidth  = ctrP.CalculateSize().Width;
            ctrP.PrintHeight = ctrP.CalculateSize().Height;
            e.Graphics.DrawString("NHẮC NHỞ CÔNG NỢ KHÁCH HÀNG", new Font("Tahoma", 16), Brushes.Black, new PointF(40, 40));
            e.Graphics.DrawImageUnscaled(ctrP.GetBitmap(), new Point(100, 100));
            e.Graphics.DrawString("STT", new Font("Arial", 11), Brushes.Black, new PointF(100, 100));
            e.Graphics.DrawString("Mã HD", new Font("Arial", 11), Brushes.Black, new PointF(160, 100));
            //e.Graphics.DrawString("Mô tả", new Font("Arial", 11), Brushes.Black, new PointF(500, 100));
        }
Beispiel #3
0
 private void printDoc_PrintPage(object sender, PrintPageEventArgs e)
 {
     ColumnHeaderStyle c = new ColumnHeaderStyle();
     lvLoaiHH.HeaderStyle = ColumnHeaderStyle.Nonclickable;
     ControlPrint ctrP = new ControlPrint(lvLoaiHH, true);
     ctrP.PrintWidth = ctrP.CalculateSize().Width;
     ctrP.PrintHeight = ctrP.CalculateSize().Height;
        e.Graphics.DrawString("DANH SÁCH LOẠI SẢN PHẨM", new Font("Tahoma", 16), Brushes.Black, new PointF(40, 40));
     e.Graphics.DrawImageUnscaled(ctrP.GetBitmap(), new Point(100, 100));
     e.Graphics.DrawString("STT", new Font("Arial", 11), Brushes.Black, new PointF(100, 100));
     e.Graphics.DrawString("Tên", new Font("Arial", 11), Brushes.Black, new PointF(160, 100));
     e.Graphics.DrawString("Mô tả", new Font("Arial", 11), Brushes.Black, new PointF(500, 100));
 }
Beispiel #4
0
 private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
 {
     ColumnHeaderStyle c = new ColumnHeaderStyle();
     lvHD.HeaderStyle = ColumnHeaderStyle.Nonclickable;
     ControlPrint ctrP = new ControlPrint(lvHD, true);
     ctrP.PrintWidth = ctrP.CalculateSize().Width;
     ctrP.PrintHeight = ctrP.CalculateSize().Height;
     e.Graphics.DrawString("NHẮC NHỞ CÔNG NỢ KHÁCH HÀNG", new Font("Tahoma", 16), Brushes.Black, new PointF(40, 40));
     e.Graphics.DrawImageUnscaled(ctrP.GetBitmap(), new Point(100, 100));
     e.Graphics.DrawString("STT", new Font("Arial", 11), Brushes.Black, new PointF(100, 100));
     e.Graphics.DrawString("Mã HD", new Font("Arial", 11), Brushes.Black, new PointF(160, 100));
     //e.Graphics.DrawString("Mô tả", new Font("Arial", 11), Brushes.Black, new PointF(500, 100));
 }