Click here to Skip to main content
16,007,163 members
Home / Discussions / C#
   

C#

 
QuestionSystem.Security.Cryptography.ProtectedData Does Not Exist [modified] Pin
Skippums12-Dec-07 6:41
Skippums12-Dec-07 6:41 
GeneralRe: System.Security.Cryptography.ProtectedData Does Not Exist Pin
Sathesh Sakthivel12-Dec-07 6:53
Sathesh Sakthivel12-Dec-07 6:53 
GeneralRe: System.Security.Cryptography.ProtectedData Does Not Exist Pin
Skippums12-Dec-07 8:39
Skippums12-Dec-07 8:39 
GeneralRe: System.Security.Cryptography.ProtectedData Does Not Exist Pin
Dave Kreskowiak12-Dec-07 8:54
mveDave Kreskowiak12-Dec-07 8:54 
GeneralRe: System.Security.Cryptography.ProtectedData Does Not Exist Pin
Skippums12-Dec-07 9:05
Skippums12-Dec-07 9:05 
GeneralRe: System.Security.Cryptography.ProtectedData Does Not Exist Pin
Dave Kreskowiak12-Dec-07 12:41
mveDave Kreskowiak12-Dec-07 12:41 
GeneralRe: System.Security.Cryptography.ProtectedData Does Not Exist Pin
Sathesh Sakthivel12-Dec-07 9:01
Sathesh Sakthivel12-Dec-07 9:01 
QuestionPrinting an image in the middle of a page Pin
devzav12-Dec-07 6:40
devzav12-Dec-07 6:40 
Hi all!

I can't make an image is printed in the middle of a page.
I use this code:
printDocument = new PrintDocument();
printDocument.OriginAtMargins = true;
			
printDocument.DefaultPageSettings.Margins = new margins((int)printDocument.DefaultPageSettings.HardMarginX,
   (int)printDocument.DefaultPageSettings.HardMarginX, (int)printDocument.DefaultPageSettings.HardMarginY,
   (int)printDocument.DefaultPageSettings.HardMarginY);

x = xCenter;
y = yCenter;

x -= MeasureConverter.FromUnitToUnit(UnitOfMeasurement.Inches, UnitOfMeasurement.Millimeters,
   printDocument.DefaultPageSettings.HardMarginX / 100);
y -= MeasureConverter.FromUnitToUnit(UnitOfMeasurement.Inches, UnitOfMeasurement.Millimeters,
   printDocument.DefaultPageSettings.HardMarginY / 100);
...

X and Y are given in millimeters, and in my printDocument_PrintPage method I have:
Graphics g = e.Graphics;
g.PageUnit = GraphicsUnit.Millimeter;
g.DrawImage(printableObj.GetMetafileImage(), x, y);
g.Dispose();
e.HasMorePages = false;

Unfortunately my image is printed not exactly in the center...
Can you help me, pls?
Thnks in advantage.
GeneralRe: Printing an image in the middle of a page Pin
Paul Conrad23-Dec-07 9:57
professionalPaul Conrad23-Dec-07 9:57 
GeneralRe: Printing an image in the middle of a page Pin
devzav23-Dec-07 10:35
devzav23-Dec-07 10:35 
QuestionUsing Interfaces to force the creation of methods Pin
Clive D. Pottinger12-Dec-07 6:21
Clive D. Pottinger12-Dec-07 6:21 
GeneralRe: Using Interfaces to force the creation of methods Pin
Skippums12-Dec-07 6:44
Skippums12-Dec-07 6:44 
GeneralRe: Using Interfaces to force the creation of methods Pin
Clive D. Pottinger12-Dec-07 7:06
Clive D. Pottinger12-Dec-07 7:06 
GeneralRe: Using Interfaces to force the creation of methods Pin
Judah Gabriel Himango12-Dec-07 9:02
sponsorJudah Gabriel Himango12-Dec-07 9:02 
GeneralRe: Using Interfaces to force the creation of methods Pin
Pete O'Hanlon12-Dec-07 11:06
mvePete O'Hanlon12-Dec-07 11:06 
GeneralSplash Screen Shows Black before Showing Pin
Sukhjinder_K12-Dec-07 5:55
Sukhjinder_K12-Dec-07 5:55 
GeneralRe: Splash Screen Shows Black before Showing Pin
Luc Pattyn12-Dec-07 7:23
sitebuilderLuc Pattyn12-Dec-07 7:23 
GeneralRemoving base.OnPaint(e) still does not help Pin
Sukhjinder_K12-Dec-07 16:22
Sukhjinder_K12-Dec-07 16:22 
GeneralRe: Removing base.OnPaint(e) still does not help Pin
Luc Pattyn13-Dec-07 7:22
sitebuilderLuc Pattyn13-Dec-07 7:22 
GeneralBut my Image is Non-Rectangular Pin
Sukhjinder_K13-Dec-07 22:11
Sukhjinder_K13-Dec-07 22:11 
GeneralGraphicsPaths and Scrolling Pin
DahrkDaiz12-Dec-07 5:38
DahrkDaiz12-Dec-07 5:38 
GeneralRe: GraphicsPaths and Scrolling Pin
Paul Conrad23-Dec-07 9:57
professionalPaul Conrad23-Dec-07 9:57 
GeneralCell phones application using c#.net Pin
mostafa_h12-Dec-07 5:26
mostafa_h12-Dec-07 5:26 
GeneralRe: Cell phones application using c#.net Pin
Sathesh Sakthivel12-Dec-07 6:57
Sathesh Sakthivel12-Dec-07 6:57 
GeneralRe: Cell phones application using c#.net Pin
mostafa_h12-Dec-07 9:49
mostafa_h12-Dec-07 9:49 

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.