Click here to Skip to main content
15,891,424 members
Home / Discussions / C#
   

C#

 
GeneralRe: Audio conversation via network - problem! Pin
eyej29-Apr-06 3:11
eyej29-Apr-06 3:11 
GeneralRe: Audio conversation via network - problem! Pin
mikker_12329-Apr-06 6:54
mikker_12329-Apr-06 6:54 
GeneralRe: Audio conversation via network - problem! Pin
eyej29-Apr-06 13:28
eyej29-Apr-06 13:28 
GeneralRe: Audio conversation via network - problem! Pin
mikker_12330-Apr-06 6:25
mikker_12330-Apr-06 6:25 
GeneralRe: Audio conversation via network - problem! Pin
eyej1-May-06 6:48
eyej1-May-06 6:48 
GeneralRe: Audio conversation via network - problem! Pin
DandyRUR10-Nov-06 6:18
DandyRUR10-Nov-06 6:18 
QuestionPage Setup Dialog & Margins Pin
Graham Dean28-Apr-06 12:39
Graham Dean28-Apr-06 12:39 
AnswerRe: Page Setup Dialog & Margins Pin
Robert Rohde28-Apr-06 22:23
Robert Rohde28-Apr-06 22:23 
Nothing. That's a bug. I think it is culture dependant - are the borders displayd in millimeters instead of inch on your machine? The dialog is just not able to handle this cleanly.
Here is the workaround (with a slight rounding error):
PageSettings pageSettings;
PageSetupDialog dlg = new PageSetupDialog();
Margins curMargin = pageSettings.Margins;
pageSettings.Margins = new Margins(
   ConvInchToMm(curMargin.Left), ConvInchToMm(curMargin.Right), 
   ConvInchToMm(curMargin.Top), ConvInchToMm(curMargin.Bottom));
dlg.PageSettings = pageSettings;
dlg.PrinterSettings = pageSettings.PrinterSettings;
			
if (dlg.ShowDialog() != DialogResult.OK) 
{
   pageSettings.Margins = curMargin;
} 

Basically the dialog converts the metrics when leaving the dialog (only with Ok not with Cancel) but doesn't do it when entering which is causing the decrease.
If you have any other metric then millimeter you surely have to adjust the conversion:
private int ConvInchToMm(int hundrInch) 
{
   return (int)(hundrInch * 2.54);
}

GeneralRe: Page Setup Dialog & Margins Pin
Graham Dean29-Apr-06 0:39
Graham Dean29-Apr-06 0:39 
QuestionC# and MS Access parameter passing Pin
achrafus28-Apr-06 11:37
achrafus28-Apr-06 11:37 
AnswerRe: C# and MS Access parameter passing Pin
Graham Nimbley28-Apr-06 11:49
Graham Nimbley28-Apr-06 11:49 
QuestionXmlSerializer problem in .NET 2.0 Pin
Wjousts28-Apr-06 11:02
Wjousts28-Apr-06 11:02 
AnswerRe: XmlSerializer problem in .NET 2.0 Pin
Ravi Bhavnani28-Apr-06 11:44
professionalRavi Bhavnani28-Apr-06 11:44 
GeneralRe: XmlSerializer problem in .NET 2.0 Pin
S. Senthil Kumar30-Apr-06 3:44
S. Senthil Kumar30-Apr-06 3:44 
GeneralRe: XmlSerializer problem in .NET 2.0 Pin
Ravi Bhavnani30-Apr-06 3:50
professionalRavi Bhavnani30-Apr-06 3:50 
GeneralRe: XmlSerializer problem in .NET 2.0 Pin
Wjousts1-May-06 4:05
Wjousts1-May-06 4:05 
AnswerRe: XmlSerializer problem in .NET 2.0 Pin
S. Senthil Kumar30-Apr-06 3:44
S. Senthil Kumar30-Apr-06 3:44 
GeneralRe: XmlSerializer problem in .NET 2.0 Pin
Wjousts1-May-06 4:07
Wjousts1-May-06 4:07 
QuestionStill random? Pin
Jon Sagara28-Apr-06 10:38
Jon Sagara28-Apr-06 10:38 
AnswerRe: Still random? Pin
Graham Nimbley28-Apr-06 11:57
Graham Nimbley28-Apr-06 11:57 
GeneralRe: Still random? Pin
Jon Sagara28-Apr-06 12:24
Jon Sagara28-Apr-06 12:24 
AnswerRe: Still random? Pin
Robert Rohde28-Apr-06 22:27
Robert Rohde28-Apr-06 22:27 
AnswerRe: Still random? Pin
Guffa28-Apr-06 23:35
Guffa28-Apr-06 23:35 
AnswerRe: Still random? Pin
leppie29-Apr-06 1:08
leppie29-Apr-06 1:08 
QuestionXML and XSL transform in C# Pin
PrashantJ28-Apr-06 9:29
PrashantJ28-Apr-06 9:29 

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.