P
Pedro Hurtado
I am using (Microsoft Office Document Imaging 11.0 Type Library) and I have
the following problem:
The method (Microsoft Office Document Imaging 11.0 Type Library)
of the interface IImage me an object type stdole.IPictureDisp,
that i can transform to
System.Drawing.Image
with the static method System.Drawing.Image.FromHbitmap,
when step the Picture property of the same form gives an error me of type
exception
correct code
MODI.DocumentClass doc = new DocumentClass();
doc.Create("e:\\midoc.mdi");
MODI.IImage img= doc.Images[0] as MODI.IImage;
stdole.IPictureDisp pic =
(stdole.IPictureDisp)img.get_Thumbnail(MODI.MiTHUMBNAIL_SIZE.miTHUMB_SIZE_MEDIUM);
this.pictureBox1.Image =
System.Drawing.Image.FromHbitmap((System.IntPtr)pic.Handle,(System.IntPtr)pic.hPal);
incorrect code
MODI.DocumentClass doc = new DocumentClass();
doc.Create("e:\\midoc.mdi");
MODI.IImage img= doc.Images[0] as MODI.IImage;
stdole.IPictureDisp pic = (stdole.IPictureDisp)img.Picture;
this.pictureBox1.Image =
System.Drawing.Image.FromHbitmap((System.IntPtr)pic.Handle,(System.IntPtr)pic.hPal);
only a question:is this a library bug?
thanks
----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.
http://www.microsoft.com/office/com...=microsoft.public.office.developer.automation
the following problem:
The method (Microsoft Office Document Imaging 11.0 Type Library)
of the interface IImage me an object type stdole.IPictureDisp,
that i can transform to
System.Drawing.Image
with the static method System.Drawing.Image.FromHbitmap,
when step the Picture property of the same form gives an error me of type
exception
correct code
MODI.DocumentClass doc = new DocumentClass();
doc.Create("e:\\midoc.mdi");
MODI.IImage img= doc.Images[0] as MODI.IImage;
stdole.IPictureDisp pic =
(stdole.IPictureDisp)img.get_Thumbnail(MODI.MiTHUMBNAIL_SIZE.miTHUMB_SIZE_MEDIUM);
this.pictureBox1.Image =
System.Drawing.Image.FromHbitmap((System.IntPtr)pic.Handle,(System.IntPtr)pic.hPal);
incorrect code
MODI.DocumentClass doc = new DocumentClass();
doc.Create("e:\\midoc.mdi");
MODI.IImage img= doc.Images[0] as MODI.IImage;
stdole.IPictureDisp pic = (stdole.IPictureDisp)img.Picture;
this.pictureBox1.Image =
System.Drawing.Image.FromHbitmap((System.IntPtr)pic.Handle,(System.IntPtr)pic.hPal);
only a question:is this a library bug?
thanks
----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.
http://www.microsoft.com/office/com...=microsoft.public.office.developer.automation