Oppure

Loading
11/07/12 11:48
pozzo1992
Io ho creato il seguente codice:

private: System::Void PRINT_PREVIEW_LinkClicked(System::Object^  sender, System::Windows::Forms::LinkLabelLinkClickedEventArgs^  e) {
			printDialog1->ShowDialog();	
			printDocument1->Print();
}

private: System::Void printDocument1_PrintPage(System::Object^  sender, System::Drawing::Printing::PrintPageEventArgs^  e) {
			int count=PREVIEW->Items->Count;
			float y = 20;
			SolidBrush^ drawBrush = gcnew SolidBrush( Color::Black );
			int i;
			for(i=0;i<count;i++)
			{
				e->Graphics->DrawString(PREVIEW->Items[i]->ToString(),PREVIEW->Font,drawBrush,0,y);
				y=y+20; 
			 }
			
 }


La stampa avviene correttamente l'unico problema è che se il listbox è troppo lungo non mi stampa più pagine ma interrompe la stampa alla prima pagina.

Grazie e spero di essermi spiegato bene.
Buona giornata :)
aaa