Compiler Error - Clipboard?

DarkMann

Member
Licensed User
Longtime User
Hi All,

I have a large desktop only program that works fine whilst in the desktop IDE, but when I try and compile it I get an error, as below.



It has only occurred since adding the clipboard library and works fine in the IDE.

The program is big, complicated and pretty ugly, but it does work otherwise.

Any help appreciated,

David
 

Attachments

  • error.jpg
    82.8 KB · Views: 1,292

agraham

Expert
Licensed User
Longtime User
More information needed. KeyDownLauncher looks like it might be a Door library Event and Obj1 a Door Object but what is in Obj1? The error is correct in that there is no SetImage in the clipboard but the code of the error line looks most unlikely to cause a problem. Maybe it's a cascade from an earlier code error. Are you using something called SetImage in your code?

The usual approach to this sort of problem is to hack large chunks of code out until the problem goes away which then gives you some idea of what is causing it. If it still occurs on a much smaller program then post it so we can see if we can replicate the error.
 

DarkMann

Member
Licensed User
Longtime User
Thanks Andrew,

I don't have a copy of the source here at home, I'll try and give some more information when I get back to it in the morning.

The only thing that may be using SetImage that comes to mind is the Barcode Library that I'm using. It copies the completed barcode into an Image on a form.

I'll give a full list of components are added tomorrow and see if I can reproduce a simple version of the code that gives the same error.

Thanks for looking,

David
 

DarkMann

Member
Licensed User
Longtime User
I've had another look at this this morning and have tried to isolate the problem. It looks like it is some sort of conflict involving the clipboard library, as removing the three lines that call the library and the library component fix all compile errors. I would have a real struggle to cut the program down to a bare core to test just this functionality.

As you surmised Andrew, the KeyDownLauncher object is a Door object, acting on the form to check for key presses. There is a pair of these for each of several forms and they work fine.

I have removed the clipboard functionality for now and will find another way to get generated barcodes involved out for printing, probably implement it all within the program when I have time to sit down and wrestle with the GDI+ library and set up a label template.

The program is a full-blown point of sale and cash register system designed for desktop use with either a keyboard or touch screen and a barcode scanner. It is replacing a version originally written several years ago in VB6. Adding the ability to create barcode labels for non-coded stock was a bonus and not important to the functionality of the product.

Thanks again Andrew for taking a look, but don't put too much effort into it.

David
 

DarkMann

Member
Licensed User
Longtime User
Hi Andrew,

Your one - Barcodes 1.0 - It works fine as far as I can see.

My program generates a barcode using your library, then copies the image to an image control to show it on screen. The plan was to then use the clipboard library, again one of yours, to copy this image to the clipboard so it could simply be pasted onto a label in word or whatever and printed out. All worked fine, until it came to compiling.

I've done everything to generate either an existing code from one scanned in or make an EAN13 code by building the checksums and this all works, it's just the clipboard library being added into the mix that trips something up.

David
 

agraham

Expert
Licensed User
Longtime User
Your one - Barcodes 1.0 - It works fine as far as I can see.
I thought it might be. I've added the Clipboard library to my Barcodes demo, attached below, and I can see no problem when I compile it. What other libraries are you using and are you merging them or using the individual dlls?
 

Attachments

  • BarcodesDemoClipboard.sbp
    3 KB · Views: 225
Last edited:

DarkMann

Member
Licensed User
Longtime User
Hi Again,

Libraries being used are:-

Barcodes.dll - not merged
Door.dll - merged
FTPDesktop.dll - not merged
RichTextBoxDesktop.dll - merged

The Clipboard was in there too, presumably merged as the.cs file is present.

The offending use of the clipboard was just to clip the final displayed image out so it could be used elsewhere.

Thanks again,

David
 

DarkMann

Member
Licensed User
Longtime User
Andrew,

Just added the libraries to your example and got the same sort of error on compilation instantly. Didn't even need to add any objects from them.

David
 

agraham

Expert
Licensed User
Longtime User
It's a Clipboard object name clash between ClipBboard and RichTextDesktop at compile time as RichTextDesktop can also use the clipboard. If you don't merge RichTextDesktop but just use the pre-compiled dll it should work OK. Alternatively, you could drop the Clipboard library from the project and try using the RichTextDesktop CopyImageToClipBoard and PasteBitmap methods.
 

DarkMann

Member
Licensed User
Longtime User
Thanks for all your help Andrew, I'll try the RichTextBox clipboard.

David
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…