Jump to content
xisto Community
jimmy89

Using Clear Image Com Need some help

Recommended Posts

Hi all,
I have been trying to use the Clear Image COM in vb.net. for those who don't know what clear image is go to http://forums.xisto.com/no_longer_exists/
i downloaded their SDK and am trying to get it to work.

all i am trying to do at the moment is find the text from a barcode, i have the barcode stored in an image file on my computer. I know the file works cause i used the demo that came with the SDK to test it out!

I am using the following code..

Imports ClearImageImports SystemPublic Class Form1	Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click		Dim file2 As String, data As String		file2 = My.Application.Info.DirectoryPath + "\image.bmp"		CiImage.Open(file2, 1)		data = CiBarcode.Text	End SubEnd Class

but when i use both the

CiImage.Open
and the
CiBarcode.Text
they both come up with a

Reference to a non-shared member requires an object reference

what does this mean and how can i use an object reference?
Thanks
-jimmy

Share this post


Link to post
Share on other sites

“Reference to a non-shared member requires an object reference” is the default code word for you didn’t put a “new” in front of one of your variables. This is of course not the technical explanation but 9 times out of 10 this is the case. I did not see where you defined CiImage or CiBarcode. They should look something like this:Dim CiImage as new WhateverItIsDim CiBarcode as new WhateverItIsWhen first starting out it is sometimes hard to know when to put the new keyword. It depends on the type of variable.

Share this post


Link to post
Share on other sites

âReference to a non-shared member requires an object referenceâ is the default code word for you didnât put a ânewâ in front of one of your variables. This is of course not the technical explanation but 9 times out of 10 this is the case. I did not see where you defined CiImage or CiBarcode. They should look something like this:
Dim CiImage as new WhateverItIs
Dim CiBarcode as new WhateverItIs

When first starting out it is sometimes hard to know when to put the new keyword. It depends on the type of variable.


yeah, i didn't use the 'new' part when declaring, now it works fine! thanks for your help
-jimmy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.