View Full Version : Weird behaviour V3.1 VB.Net9 Windows 7

April 9, 2010, 08:11:20
First of all thank you for the ICimaging Control. It has been fun working with it and it is quite simple yet very powerful.

Version Info: ICImagingControl 3.1, VB.Net 2008, Windows 7

I have an app which as part of its business process involves opening 2 forms that contain ICImagingControl (at different times), capturing images, processing them and then closing the forms. The 2 forms are opened and closed repeatedly for each client processed.

After doing some tidy up I started doing some final testing. I found that the second time the form was openned it would error out with the error message " FrameFilter Collection is currently read only". I wondered why it had suddenly started to error. I figured that I should tidy up prior to closing the form so used .livestop and .clear and a .remove

As soon as I used the livestop before closing the form, the error disappeared, however on the second and subsequent openings of the form, the Live picture jumps out of its container and out of its form and appears on the desktop at position(0,0). If another form is maximised it shows on this at the same position.

I eventually found that the reason for the change of behaviour was that I had changed the call for the form from a simple "form.show()" to a "form.showdialog()".

In the meantime I will code the form to behave like a dialog so that my IC control can happily do its job.

If anyone knows a simple solution for using ICImagingControl in a dialog form I would love hear about it.


Edit 1
Correction: The First form works OK with a showdialog() call. It is a simple capture form.
The second form was using a ROI filter in the IC control. This is the one that errors after a showdialog().
If you comment the devicefilter ROI section out (to make it simple) it will still continue the weird behaviour untill I call it with a form.show().
So its not as simple as I first thought!

Stefan Geissler
April 9, 2010, 10:29:25

We checked what is going on, when .NET hides a form: This child window is destroyed, all window handles become invalid. Thus IC Imaging Control will loose the window handle. If the form is shown again, it is created new, but IC Imaging Control is not informed about this. However, the following workaround will fix this. You must only implement the VisibleChanged event handler for
your form. (This problem was detected first time when a MDI form was hidden.)

You may also add following event handler in your form:

private void Form1_VisibleChanged(object sender, EventArgs e)
if (this.Visible)

There is not much we can do about this, but we worked on this issue in the latest version ( of IC. If you have an older version of IC, you may create a support case at http://www.imagingcontrol.com/en_US/support/case/ for an update.