Forms are the basic building blocks through which you create your own custom dialog boxes for your application. Through custom forms you can provide information to users, get information from users, or have your users control activity in the application.
Forms are like an artist's canvasâ€”they start out blank. To fill your canvas, you need a palette. In this case, your palette is the control toolbox. You, as the artist, place selected controls from the toolbox onto the form. You can add as many controls as you like. At any time you can adjust size and properties of the controls and even the form itself. Finally, you add the functionality (code) to the controls that brings your form to life.
Although Visual Basic 6 supports different types of forms, VBA supports only the UserForm. This means some forms have been created and exported in Visual Basic 6 that cannot be imported into VBA.
.UserFormsâ€”or forms, as they are called in this guideâ€”can be modal or modeless. The ShowModal property of a form determines whether it is modal or modeless. Modal forms displayed in your running application must be closed before users can perform any other action in the application. For more information about working with modal forms, see
A blank form is created and added to your project.
The AcFocusCtrl keeps the focus on the form during user interaction.