jimmy89 0 Report post Posted January 18, 2007 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 theCiImage.Openand theCiBarcode.Textthey both come up with a Reference to a non-shared member requires an object referencewhat does this mean and how can i use an object reference?Thanks-jimmy Share this post Link to post Share on other sites
tansqrx 0 Report post Posted January 21, 2007 “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
jimmy89 0 Report post Posted January 21, 2007 â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. 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