Link to home
Start Free TrialLog in
Avatar of ruanlab123
ruanlab123Flag for South Africa

asked on

Convert stdole.IFontDisp to font

Hi

I am busy with a report designer application in C# using the Crystal Reports design lybaries - CRAXDDRT.
I've created a font object : public Font objectFont and wants to assign the objectFont to a spesific reportfield font.

CRAXDDRT.TextObject textfield;
textfield = (CRAXDDRT.TextObject)Report.Sections[Section].ReportObjects[RepObj];

objectFont = textfield.font;

But the following error occurs : Error      2      Cannot implicitly convert type 'stdole.IFontDisp' to 'System.Drawing.Font'      

How can I convert a stdole.IFontDisp to System.Drawing.Font?
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ruanlab123

ASKER

thank you very much, works 100%