Click here to Skip to main content
15,867,756 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionWhat to do with dependent assemblies when using a COM wrapper. Pin
Gary Hyslop at home21-Sep-04 4:03
Gary Hyslop at home21-Sep-04 4:03 
AnswerRe: What to do with dependent assemblies when using a COM wrapper. Pin
Steven Campbell21-Sep-04 5:15
Steven Campbell21-Sep-04 5:15 
GeneralRe: What to do with dependent assemblies when using a COM wrapper. Pin
Gary Hyslop at home21-Sep-04 7:24
Gary Hyslop at home21-Sep-04 7:24 
GeneralRe: What to do with dependent assemblies when using a COM wrapper. Pin
Steven Campbell21-Sep-04 16:27
Steven Campbell21-Sep-04 16:27 
QuestionHow to get properties printing? Pin
I am kai20-Sep-04 22:20
I am kai20-Sep-04 22:20 
AnswerRe: How to get properties printing? Pin
progload24-Sep-04 18:40
progload24-Sep-04 18:40 
GeneralPrinting font size issue Pin
Null Monkey20-Sep-04 11:02
Null Monkey20-Sep-04 11:02 
GeneralRe: Printing font size issue Pin
sreejith ss nair20-Sep-04 18:07
sreejith ss nair20-Sep-04 18:07 
hi,

I wrote an article for the same. But i forgot the discusson group where i kept that. but still i have that source which will help you to print your page and content while keeping the font size in mind.


private void menuItem6_Click(object sender, System.EventArgs e)
{
try
{
PrintDia=new PrintDialog();
PrintDia.Document=printDocument1;
string content=this.Editor.Text;
StrReader=new StringReader(content);
if(PrintDia.ShowDialog()==DialogResult.OK)
{
this.printDocument1.Print();
}
}
catch(Exception Ex)
{
MessageBox.Show(Ex.Message.ToString());
}
}

private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
try
{
float Lines_Per_Page = 0;
float Y_Position = 0;
int Count = 0;
float Left_Margin = e.MarginBounds.Left;
float Top_Margin = e.MarginBounds.Top;

string Line = null;
Font fnt = Editor.Font;
SolidBrush Solid = new SolidBrush(Color.Black);

Lines_Per_Page=e.MarginBounds.Height/Font.GetHeight(e.Graphics);

while(Count < Lines_Per_Page && ((Line=StrReader.ReadLine())!=null ))

{

// calculate the next line position based on
// the height of the font according to the printing device
Y_Position =Top_Margin + (Count * fnt.GetHeight(e.Graphics));

// draw the next line in the rich edit control

e.Graphics.DrawString(Line ,fnt ,Solid ,Left_Margin ,Y_Position ,new StringFormat());

Count++;
}

if(Line !=null)
e.HasMorePages=true;
else
e.HasMorePages=false;
}
catch(Exception Ex)
{
MessageBox.Show(Ex.Message.ToString());
}


}

private void menuItem4_Click(object sender, System.EventArgs e)
{
try
{
string Content=Editor.Text;
StrReader = new StringReader(Content);
PrintPreviewDialog Print_Preview=new PrintPreviewDialog();
Print_Preview.Document=printDocument1;
Print_Preview.ShowDialog();
}
catch(Exception Ex)
{
MessageBox.Show(Ex.Message.ToString());
}
}

**************************
S r e e j i t h N a i r
**************************
GeneralRe: Printing font size issue Pin
Null Monkey21-Sep-04 8:32
Null Monkey21-Sep-04 8:32 
GeneralReplicating Tahoma 8pt, FlatStyle=System with drawstring Pin
Al Gardner20-Sep-04 4:55
Al Gardner20-Sep-04 4:55 
GeneralRemote SQLServer Connection in .NET Pin
Sendilkumar.M20-Sep-04 1:44
Sendilkumar.M20-Sep-04 1:44 
GeneralRe: Remote SQLServer Connection in .NET Pin
Colin Angus Mackay20-Sep-04 1:59
Colin Angus Mackay20-Sep-04 1:59 
GeneralRe: Remote SQLServer Connection in .NET Pin
Sendilkumar.M20-Sep-04 2:17
Sendilkumar.M20-Sep-04 2:17 
GeneralRe: Remote SQLServer Connection in .NET Pin
Colin Angus Mackay20-Sep-04 2:42
Colin Angus Mackay20-Sep-04 2:42 
GeneralRe: Remote SQLServer Connection in .NET Pin
Sendilkumar.M20-Sep-04 17:50
Sendilkumar.M20-Sep-04 17:50 
GeneralThread Safe Pin
Sendilkumar.M19-Sep-04 19:34
Sendilkumar.M19-Sep-04 19:34 
GeneralRe: Thread Safe Pin
mav.northwind19-Sep-04 22:24
mav.northwind19-Sep-04 22:24 
GeneralRe: Thread Safe Pin
Sendilkumar.M20-Sep-04 2:19
Sendilkumar.M20-Sep-04 2:19 
GeneralRe: Thread Safe Pin
mav.northwind20-Sep-04 23:40
mav.northwind20-Sep-04 23:40 
GeneralManaging User Accounts and Gruops at Runtime Pin
joaoPaulo17-Sep-04 2:09
joaoPaulo17-Sep-04 2:09 
GeneralRe: Managing User Accounts and Gruops at Runtime Pin
Anonymous17-Sep-04 12:14
Anonymous17-Sep-04 12:14 
GeneralUsing Windows XP Visual Styles Pin
aninddroy16-Sep-04 23:24
aninddroy16-Sep-04 23:24 
QuestionHow does .net runtime bind an assembly at runtime Pin
pgupta808016-Sep-04 21:30
pgupta808016-Sep-04 21:30 
AnswerRe: How does .net runtime bind an assembly at runtime Pin
sukesh.g19-Sep-04 20:42
sukesh.g19-Sep-04 20:42 
General.NET Remoting hosted in IIS Pin
be kunkun16-Sep-04 20:01
be kunkun16-Sep-04 20:01 

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.