Hello world cvb

private void Form1_Load(object sender, EventArgs e)
        {
            var f= axCVimage1.LoadImageByDialog();
            axCVdisplay1.Image = axCVimage1.Image;
            axCVdisplay1.Refresh();
        }

Doesn’t actually return an image. Yeah… I’m having one of those days :disappointed_relieved:

All the other examples run just fine for me, but every project I create doesn’t. I load the same .vin driver for my own software and the tutorial examples. Still, only the tutorial files actually work.

To make it even more interesting, .emu files do work for both my own code and the sample code (so do normal images). Any ideas?

1 Like

Hi @CvK,
are you using CVB 64? Then it might be that you still have the Prefer 32-bit enabled. From .Net getting started:

1 Like

Ah yes, that did the trick. Thanks :grin:

You are welcome :wink:. I basically run into this every time I create a new project…

You are right about it causing very weird behavior. When that pesky tickbox is left checked, static images will load, and so will .emu files.

I know, but of course there is a reason for this. :nerd_face:

Visual Studio is a 32-bit app. So for you to be able to put an ActiveX control (OCX) in the Forms designer, we need to install the :cvb: OCXs also in a special 32-bit variant. As these are linked against the CVCImg.dll, loading bmp, mio and emu works. For other files or drivers additional libraries are needed which then fail to load. (We only install the necessary 32-bit libraries to make the designer use case work.)

1 Like