InForm is a Rapid Application Development tool for QB64. It consists of a library of graphical routines and a WYSIWYG editor that allows you to design forms and export the resulting code to generate an event-driven QB64 program.
<iframewidth="560"height="315"src="https://www.youtube.com/embed/9UAzHco-Fgs"title="YouTube video player"frameborder="0"allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"allowfullscreen></iframe>
**Event-driven QB64 programs**
Inform's main goal is to generate event-driven QB64 applications. This means that you design a graphical user interface with interactive controls and then write the code to respond to such controls once they are manipulated.
#### Workflow
After your form looks the way you want it to, click File -> Save to export its contents and generate a .bas source file. Two files are output:
* **.frm** the generated form in QB64 code. This can be loaded back into the form designer or edited in QB64 or any text editor later, if you want to adjust fine details.
* **.bas** the actual program you will add your code to.
You add code to respond to events:
* *Click*
* *MouseEnter/MouseLeave* (hover)
* *FocusIn/FocusOut*
* *MouseDown/MouseUp* (events preceding a *Click*)
* *KeyPress*
* *TextChanged* (for text box controls)
* *ValueChanged* (for track bars, lists and dropdown lists)
* There are also events that occur in specific moments, to which you can respond/add code:
* *BeforeInit*, triggered just before the form is shown.
* *OnLoad*, triggered right after the form is first shown.
* *BeforeUpdateDisplay*, triggered everytime the form is about to be repainted.
* *BeforeUnload*, triggered when the user tries to close the program, either via clicking the window’s X button, right click in the task bar -> Close or with Alt+F4 (Windows only).
* *FormResized*, triggered when a form with the CanResize property is resized at runtime.
### Editor
![InForm Designer](images/inform_designer.png)
You create a new form with the Editor. You can add new controls, edit their properties, align controls and edit their z-ordering.
The following controls are available (as of v1.0).
![InForm Controls](images/inform_controls.png)
- Button
- Label
- Textbox
- Numeric Textbox
- Checkbox
- Radio button
- List
- Dropdown list
- Track bar/Slider
- Progress bar
- Picture box
- Frame
- Toggle switch
- Menus
You can also add menus (both in the menu bar or as contextual menus) to your program (Insert - Add menu bar/context menu).
## Preview Component
Your form's design is updated in real-time. The preview component is automatically launched with the Editor and gives you several tools to format your controls.