473,395 Members | 1,649 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

MODI ERROR

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.MiTHUM BNAIL_SIZE.miTHUMB_SIZE_MEDIUM);
this.pictureBox1.Image =
System.Drawing.Image.FromHbitmap((System.IntPtr)pi c.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)pi c.Handle,(System.IntPtr)pic.hPal);

thanks
May 30 '06 #1
0 1865

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: RicercatoreSbadato | last post by:
Is there a way to use the MODI OCR component in an application on a system whitout Office 2003? Which DLL have I to copy? tnx ;)
0
by: jhazucha | last post by:
Im using C# and MODI, I can get the document into my application with eas' but the only way I can see to tell it what data I actually need from the document is to use the MiDocView. now I dont want...
3
by: David de Passos | last post by:
Hi! I'm using MODI activex from Microsoft Office 2003 and Microsoft VB.NET to get the text from an OCR acquired image. Why after OCR the image, the MODI component rotate the image? ...
0
by: | last post by:
Hello I have a MODI (Microsoft Office Document Imaging) document and I want to show thumbnails form all the pages in the document on a form. How can i put a MODI-Image into a Picturebox using...
1
by: Tod Birdsall | last post by:
I am using Microsoft Office Document Imaging (MODI) with great success. However, when execute the following code, I get the error "The process cannot access the file 'myFile.tif'" (File name has...
1
by: hangdee | last post by:
I am trying to use MODI (Microsoft Office Document Imaging) viewer control in my VB 2005 application. But when I drag the MODI viewer control into my form, it prompts that "Failed to import the...
0
by: fyderniX | last post by:
Hey; I'm using the Document Imagine API from Office 2003. I need to get away from the proprietary MDI/TIFF formats it produces. It looked pretty simple, but it's giving me grief when I try to...
0
by: surezu sanmugam | last post by:
Hi all, i have to developing a document processing project using microsoft office document imaging(MODI) library in visual studio 2005. My problem is when i adding MODI viewer control to the...
2
by: sphinney | last post by:
Hi everyone. I have a form in my Access 2007 database with a Microsoft Office Document Imaging Viewer Control 12.0 object on it. The object is named "GRAPHIC_mdv". When the form opens I want to...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.