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

.NET (Core and Framework)

 
GeneralRe: Do customers trust Web Services? (It runs on top of IIS, right?) Pin
Daniel Turini24-Sep-04 3:15
Daniel Turini24-Sep-04 3:15 
GeneralRe: Do customers trust Web Services? (It runs on top of IIS, right?) Pin
Salil Khedkar27-Sep-04 23:35
Salil Khedkar27-Sep-04 23:35 
GeneralMachine won't act as Remoting Server Pin
Derek Lakin23-Sep-04 6:24
Derek Lakin23-Sep-04 6:24 
QuestionHow Guru's Pin
sreejith ss nair23-Sep-04 1:56
sreejith ss nair23-Sep-04 1:56 
GeneralAssembly Header Pin
sreejith ss nair23-Sep-04 1:52
sreejith ss nair23-Sep-04 1:52 
GeneralHTTP Simulation for WEb Services Pin
matef22-Sep-04 23:11
matef22-Sep-04 23:11 
GeneralGPS Pin
mathon21-Sep-04 13:44
mathon21-Sep-04 13:44 
GeneralRe: GPS Pin
Nnamdi Onyeyiri24-Sep-04 0:39
Nnamdi Onyeyiri24-Sep-04 0:39 
QuestionBusiness Contact Manager & .net Framework 2? Pin
BillyBlue21-Sep-04 7:38
BillyBlue21-Sep-04 7:38 
AnswerRe: Business Contact Manager & .net Framework 2? Pin
Anonymous22-Sep-04 19:58
Anonymous22-Sep-04 19:58 
AnswerRe: Business Contact Manager & .net Framework 2? Pin
Anonymous22-Sep-04 20:00
Anonymous22-Sep-04 20:00 
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 

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.