ListViewItem lvi = new ListViewItem(); string s1; string s2; s1 = lvi.ListView.Items(0); s2 = lvi.ListView.Items(lvi.ListView.Items.Count - 1); string str = s1 + s2; Graphics g= ppea.Graphics; Font font = new Font("Time new Roman", 14); SizeF sizef = g.MeasureString(str, font);
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionvoid OnPrintPage(object obj, PrintPageEventArgs ppea) { ListViewItem lvi = new ListViewItem(); string s1; string s2; s1 = lvi.ListView.Items(0); s2 = lvi.ListView.Items(lvi.ListView.Items.Count - 1); string str = s1 + s2; Graphics g= ppea.Graphics; Font font = new Font("Time new Roman", 14); SizeF sizef = g.MeasureString(str, font); g.DrawString(str, font, Brushes.Black,0,0); iPageNumber += 1; iPagesToPrint -= 1; ppea.HasMorePages = iPagesToPrint > 0; }