473,756 Members | 7,611 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.IPicture Disp,
that i can transform to
System.Drawing. Image
with the static method System.Drawing. Image.FromHbitm ap,
when step the Picture property of the same form gives an error me of type
exception
correct code

MODI.DocumentCl ass doc = new DocumentClass() ;
doc.Create("e:\ \midoc.mdi");
MODI.IImage img= doc.Images[0] as MODI.IImage;
stdole.IPicture Disp pic =
(stdole.IPictur eDisp)img.get_T humbnail(MODI.M iTHUMBNAIL_SIZE .miTHUMB_SIZE_M EDIUM);
this.pictureBox 1.Image =
System.Drawing. Image.FromHbitm ap((System.IntP tr)pic.Handle,( System.IntPtr)p ic.hPal);
incorrect code

MODI.DocumentCl ass doc = new DocumentClass() ;
doc.Create("e:\ \midoc.mdi");
MODI.IImage img= doc.Images[0] as MODI.IImage;
stdole.IPicture Disp pic = (stdole.IPictur eDisp)img.Pictu re;
this.pictureBox 1.Image =
System.Drawing. Image.FromHbitm ap((System.IntP tr)pic.Handle,( System.IntPtr)p ic.hPal);

thanks
May 30 '06 #1
0 1897

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

Similar topics

1
2463
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
4545
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 that. im basically trying to automate this so that the app run's .. looks thru a directory grabs all the scanned documents which are all the same form layout's and grab the PO Number from the upper right and then export the data to a text file...
3
12293
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? Sometimes the MODI rotates the image 90 degrees and the OCR, obviously, can' t do its job. Any ideia why this is happening?
0
1377
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 vb.net? Thank you a lot Stefan
1
8901
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 been shortened). Here is the code I am using: -- BEGIN CODE -- public class OCRUtil : IDisposable { const string FILENAME = "myFile.tif"; private MODI.Document doc = null;
1
2080
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 ActiveXcontrol. Please ensure it is properly registered" What is the problem? I want to use the MODI viewer to show tiff file, please help
0
1806
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 convert the IPictureDisp object it creates into an Image for use with .NET: -----begin source (C#)----- //Take page 1 MODI.Image page_1 = (MODI.Image) doc.Images;
0
1820
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 toolbox and drag it into windows form,it will thrown "Failed to import the activex control.Please ensure it is properly registered" error..please let me right what i did wrong.. thanks in advance
2
4823
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 take the path and filename information passed to the form (via the form's opening arguements) and display the file in the MODI Viewer Control object. I'm using the following code to do this: Private Sub Form_Open(Cancel As Integer) Dim miDOC As...
0
9384
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9212
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9790
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9779
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9645
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5247
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3742
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3276
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.