No announcement yet.

Switching Forms - Again

  • Filter
  • Time
  • Show
Clear All
new posts

  • Switching Forms - Again

    I have spent several hours googling, reading app notes, (including the SOMO app) to try and figure out how forms work and how to switch them in VISI. Information is very sparse. It seems like the only way code is generated for a form if it has a background image assigned to it. Adding just control(s) to a form doesn't appear to make it auto generate code for the form.

    1. I added a background color to a form then added a meter on top of the background color. If you paste the form code you get the "not found" error so many others have struggled with. This is very counter intuitive. It will compile if you delete the form code. The meter will show up but no background color.

    2. If there is a way in Visi to create a form with only a background color, add controls to it, then switch to the form in code, what is the exact code command you use to do this?


  • #2
    There is nothing 'magical' about ViSi, it just uses standard 4DGL behind the scenes.

    The only time there is any
        // Form1 1.1 generated 27/04/2016 6:55:58 AM
        media_SetAdd(iForm1H, iForm1L) ;      // point to the Form1 image
        media_Image(0, 0) ;            // show image
    'usable' code generated is when the form has a background image.

    For all other cases, you need to do a
        gfx_Cls() ;
    yourself, if the Bg colour is black then use BLACK for the colour.

    So, for Goldelox at least, forms are more of a way of splitting the visual perception into 'parts' during design time, you can do any combination of elements from any form in your code.

    If you look inside the "" file that is generated you can see all the constants that get defined during the build process.

    Have a look at the KbStaticText demo that is included with Workshop and see how it handles multiple forms.


    • #3
      Thanks Mark. Sounds like the Goldelox processor has no concept of what a form is at that level. The concept of forms at design time does help organize a project.