How to Build a GUI in Visual Basic


GUI, or Graphical User Interface, is the user interface of a program and all the objects on it that allow a user to interact with it using images rather than text. For example, Windows is GUI, while DOS is text based. Visual Basic is an event-driven programming language and integrated development environment developed by Microsoft that makes heavy use of predefined code components. Visual Basic's visual design environment allows for developers to rapidly build or enhance GUI-based programs and applications. Creating a GUI-based program in Visual Basic is as easy as dragging and dropping controls on a form object.

  • After opening Visual Basic, click "File" and select "Standard EXE" to create a new Visual Basic project. A standard Visual Basic form will be displayed for you to start building your GUI program.

  • Click on the corner of the form and drag to re-size it.

  • Start adding components onto your form and program. Click on the "Tools box." Drag and add controls such as buttons, text boxes, combo boxes, labels and text to your Visual Basic form control. Re-size them as you see fit on the main control form, and adjust their properties and attributes to correspond with your program.

  • Double-click on each control and add Visual Basic programming code to affect the control's interaction with user.

  • Change settings and properties of the form by using the form's properties window.

  • Save your project. Click "File" and then "Save As." Give your GUI program a name, and save your work when done.

  • Press "F5" to run and test your program.

  • Make it an executable GUI program. Click "File" and "Make [project name] EXE.exe". Find the saved Executable file on your computer and double-click on it. You should see your program as a GUI display on your computer screen.

Related Searches


Promoted By Zergnet



You May Also Like

Related Searches

Check It Out

Geek Vs Geek: Robot battles, hoverboard drag race, and more

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!