Home Image-Pro General Discussions

Workbench Developer Environment has some strange behaviour

Currently I returned to write some code for an IP 10 Addin. And I feel I should post some behaviour that is a bit unnerving.

1. Each time one presses return to insert a new line in the code, automatically a line is inserted with "End Class". 

I would rather prefer that an "End Class" only is automatically added if one has just wrote the initial "Public Class xyz"-line.

2. Loading the app: It seems that there are conditions when the app can't be loaded by the Load-Button  , even there is no popping up of error messages. 

Has someone an explanation for it ?

3. Similar to no. 2, I experience that my loaded app window appears sometimes / suddenly in a way as if it were not enabled (textbox background color changes to 
 ). But the user is still able to write into text fields / press buttons / etc.. 

Has someone an explanation for this one, too ?

All your help and thoughts are greatly appreciated.

Best regards, Helga


  • Hi Helga,

    Your questions are related to the app creation steps and macro programming in Image-Pro and I would recommend to look at some tutorials on our YouTube channel https://www.youtube.com/@imageanalysis.
    Please check https://youtu.be/jIRyvLxxWXM that shows a tutorial to create an app and define its properties.
    You can also load existing free apps from our App Center and check them as examples.

    Regarding your specific questions:

    1. It looks like your code misses "End Class" line, so it's added automatically.
    2. Do you mean the Load button of your app? That button supposed to open the App dialog. The tutorial above shows how to change the icon for that button.
    3. I don't quite understand that issue, it looks like something in your app panel. The tutorial may help you with that.



  • Thank you, Yuri, for your quick response.

    I however looked for something more substantial and deeper than the beginner's tutorials, as I am not a novice.

    1. End Class is there, was there from the beginning of my code writing. So any other ideas ??? Is there a way to turn off "auto-completing" for instance.

    2. I meant the Load-Button in the workbench (IDE) that one has to use after editing the code to update the app.

    3. This is also related to writing an app. 

    If you have any more info, I would certainly be happy. If not, let me know also.

  • Hi Helga,

    Image-Pro macro language is a version of VB.NET, so you can use VB.NET code samples in IP programming.
    The help page for basic IP macro programming: https://help.mediacy.com/Image-Pro/11/en/Content/MCE/LandingPages/LP-6-Scripting%20and%20Automation.htm

    You can also use our existing apps  (from our App Center) as examples:


    You can look at the source code, at the designer, debug it step-by-step, it can be a good starting point.

    Regarding the specific questions about problems with "auto-completion" and unexpected window: it could be caused by some issues in your app, it's hard to tell without looking at the code (we don't see these problems in our apps). If  you could send me the code (package your project as IPX file), I would check it. Click here to upload files.



  • Hi Yuri,
    I am now aware of my wrong doing, that caused all the problems regarding the auto-completion, failure of debugging etc.
    As I am very familiar with VS - I built the app GUI first in VS and then I made a simple copy paste of the controls into the IP app designer, the same with the code. The IP code interpreter wasn't complaining with using the Me.Load event, and all the control events but after I rebuilt the complete UI within IP workbench, all the problems are solved.

    Well, what looked as a time-saving workflow (first VS than IP) was not at all practicable :blush:  

  • Helga,

    Image-Pro macro language is not 100% compatible with Visual Studio, especially designer mode. 

    If you preferer using Visual Studio developing modules for Image-Pro - it is possible. You can create and debug Image-Pro add-ins in Visual Studio. It's descrived in this post: https://forums.mediacy.com/discussion/260/creating-an-image-pro-premier-add-in. The original post is quite old, but there are comments below with a ZIP with a sample addin, which you can use now.


  • Yuri,
    Thank you. I need definately look into this. Is the project than compiled as an dll library or exe ??? Do I get this information from the templates that I could download from PierreDs thread?

    Besides, I am interested in which perimeter is used in the IP Measurement Roundness calculation ( p e r i m e t e r ² / 4 pi area). I didn't find any information hereto in the documentation.

    The available perimeter measurements listed as follows:
    bounding pixel,
    bounding polygon,
    convex hull and
    equiv. Ellipse.

    Again, thank you.

    Regards, Helga
  • Hi Helga,

    The project creates a DLL. I've attached a new sample project (ImageProAddin2), which will work with IP10 or IP11.
    Note that you have to map Image-Pro program folder (e.g. C:\Program Files\Media Cybernetics\Image-Pro 11\) to X:\.

    After compiling the project the ImageProAddIn2.dll and ImageProAddIn2.Addin will be copied to the X:\ folder and when you start Image-Pro, you should see the Samples tab with the addin icon, which has a panel with one button that applies a Sobel filter to the active image:

    The Roundness is based on Area Polygonal and Perimeter Bounding Polygon.


  • Yuri,
    Great. Works like a charm :smile: 
    Like it. 

Sign In or Register to comment.