Click here to Skip to main content
15,908,264 members
Home / Discussions / C#
   

C#

 
GeneralRe: Interfaces in C# Pin
Stefan Troschuetz16-Jun-04 19:31
Stefan Troschuetz16-Jun-04 19:31 
GeneralRe: Interfaces in C# Pin
saud_a_k16-Jun-04 19:41
saud_a_k16-Jun-04 19:41 
GeneralRe: Interfaces in C# Pin
Stefan Troschuetz16-Jun-04 19:46
Stefan Troschuetz16-Jun-04 19:46 
GeneralRe: Interfaces in C# Pin
LongRange.Shooter17-Jun-04 3:22
LongRange.Shooter17-Jun-04 3:22 
GeneralDate Picker in DataGrid Pin
sulmun16-Jun-04 0:19
sulmun16-Jun-04 0:19 
GeneralRe: Date Picker in DataGrid Pin
Heath Stewart16-Jun-04 4:18
protectorHeath Stewart16-Jun-04 4:18 
GeneralPrintPreviewDialog? - HowTo convert string to PrintDocument! Pin
QzRz16-Jun-04 0:12
QzRz16-Jun-04 0:12 
GeneralRe: PrintPreviewDialog? - HowTo convert string to PrintDocument! Pin
exhaulted16-Jun-04 0:41
exhaulted16-Jun-04 0:41 
If you are using visual studio use the designer to add a PrintDocument object to your form.

In your function that calls the print event put the following
try<br />
{<br />
        PrintPreviewDialog preview = new PrintPreviewDialog();<br />
	preview.Document = printDocument1;<br />
	preview.ShowDialog();<br />
	if (preview.DialogResult == DialogResult.OK)<br />
		printDocument1.Print();<br />
}


In the printDocument1.Print event (this can be created by ouble clicking the printDocument1 object in the designer) write the following code
e.Graphics.DrawString(richTextBox1.text, myFont, Brushes.Black,<br />
LeftMargin, YPosition, new StringFormat());


You will have to provide the values for myFont, LeftMargin and YPosition.

Hope this helps

KP
GeneralRe: PrintPreviewDialog? - HowTo convert string to PrintDocument! Pin
QzRz16-Jun-04 0:52
QzRz16-Jun-04 0:52 
GeneralRe: PrintPreviewDialog? - HowTo convert string to PrintDocument! Pin
exhaulted16-Jun-04 1:09
exhaulted16-Jun-04 1:09 
GeneralRe: PrintPreviewDialog? - HowTo convert string to PrintDocument! Pin
QzRz16-Jun-04 1:29
QzRz16-Jun-04 1:29 
GeneralRestricting new rows on a datagrid Pin
exhaulted16-Jun-04 0:08
exhaulted16-Jun-04 0:08 
GeneralRe: Restricting new rows on a datagrid Pin
the last free name16-Jun-04 3:37
the last free name16-Jun-04 3:37 
GeneralRe: Restricting new rows on a datagrid Pin
exhaulted16-Jun-04 3:59
exhaulted16-Jun-04 3:59 
GeneralRe: Restricting new rows on a datagrid Pin
Heath Stewart16-Jun-04 4:13
protectorHeath Stewart16-Jun-04 4:13 
GeneralRe: Restricting new rows on a datagrid Pin
exhaulted16-Jun-04 4:55
exhaulted16-Jun-04 4:55 
GeneralSave as dialog box for pocket pc in c# Pin
yyuull15-Jun-04 23:37
yyuull15-Jun-04 23:37 
GeneralRe: Save as dialog box for pocket pc in c# Pin
Dave Kreskowiak16-Jun-04 3:59
mveDave Kreskowiak16-Jun-04 3:59 
GeneralRe: Save as dialog box for pocket pc in c# Pin
Anonymous18-Jun-04 3:22
Anonymous18-Jun-04 3:22 
GeneralFlicker free panel Pin
PrebKlok15-Jun-04 22:31
PrebKlok15-Jun-04 22:31 
GeneralRe: Flicker free panel Pin
Meysam Mahfouzi15-Jun-04 23:37
Meysam Mahfouzi15-Jun-04 23:37 
GeneralRe: Flicker free panel Pin
PrebKlok15-Jun-04 23:44
PrebKlok15-Jun-04 23:44 
GeneralRe: Flicker free panel Pin
Meysam Mahfouzi15-Jun-04 23:52
Meysam Mahfouzi15-Jun-04 23:52 
GeneralRe: Flicker free panel Pin
Heath Stewart16-Jun-04 4:12
protectorHeath Stewart16-Jun-04 4:12 
GeneralRe: Flicker free panel Pin
Meysam Mahfouzi16-Jun-04 17:26
Meysam Mahfouzi16-Jun-04 17:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.