SlideServe
Menu
Préférences
© SlideServe · v2026

Visual Programming Essentials: A Guide to Visual Basic Environment

nathalieg avatar
22 diapositives · 272 Views · Jan 07, 2020

Learn the fundamentals of event-driven programming using Visual Basic. Explore control properties, code windows, and project forms. Enhance your understanding of event handling and control design in Windows applications.

Visual Programming Essentials: A Guide to Visual Basic Environment - slide 1
01 / 22Visual Programming Essentials: A Guide to Visual Basic Environment
1 / 17

Télécharger la présentation

Visual Programming Essentials: A Guide to Visual Basic Environment
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation

Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement. Téléchargez la présentation en cliquant sur ce lien. Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.

F I N

Plus de contenu associé

Transcription de la présentation
  1. ICS 012 Visual Programming I Second Semester 2004-2005 (042) Ahmed Esmat aesmat@kfupm.edu.sa http://staff.kfupm.edu.sa/ITC/aesmat/

  2. ICS 012 Visual Programming I WEEK 1 • Visual and Event Driven Programming • An Overview of Visual Basic (IDE)

  3. Aims and Objectives • To understand what is visual and event driven programming • The Visual Basic Programming environment • Background to BASIC • Background to Windows • Visual Basic Environment • Design/Control/Project/Form/Code Windows • Control Properties • Events & Event Driven Programming • Visual Basic Programs

  4. Visual Programming Aims • Aim is to develop the necessary skills to design and construct small-scale interactive software • Aim is to educate you with the fundamental principles of designing and writing programs • Visual Basic will be the target language but skills gained will be applicable to other languages

  5. Event Driven Programming • Event-driven programs respond to events from the computer, such as the mouse button being pressed. • The designer uses ready-made objects such as CommandButtons and TextBoxes, to build user interfaces that make up the application. • This approach to programming drastically reduces the amount of code required to develop a Windows application.

  6. Visual Programming Languages • Windows easy to use • Programming via Visual environments • .NET • Visual C++, C# • Java, J++, J# • Borland Delphi and others… • Visual Basic developed in-house at Microsoft • Interface designer • Simple coding language • Quick to produce programs

  7. Visual Basic Concepts • Controls - Processing • Everything is a ‘control’ • Controls have pre-defined ‘events’ • Code can be attached to an event • When an event occurs • if code has been attached it is executed, • otherwise default processing takes place

  8. Running VB Opening screen Select this option - Standard EXE

  9. Toolbar Control Toolbox Visual Basic Environment • Components of the VB Design Environment Form Project Explorer Properties Form Layout

  10. Event Driven Programs in VB • In normal programming your application is always in control • In GUI(Graphical User Interface) programming you have a number of options which may be triggered • Events happen to a Control • mostly user generated events • controls can also cause events

  11. Control Toolbox

  12. The events that can happen to a Command Button Events • Each Control has a relevant set ofEvents

  13. Design Time • Simply change the words alongside the property. Ie Visual Basic Environment- Properties Window • Controls - Properties • All controls have appropriate properties such as • Height, Name, Colour • they can be changed either at design-time or at run-time Main Menu

  14. Run Time • in your code/program • Private Sub Form1_load() • Form1.Caption = “Main Menu” • End Sub Visual Basic Environment- Properties Window

  15. Visual Basic Event Processing Trigger Event Code Executed

  16. Project Explorer

  17. Visual Basic Program Structure • Project File • ‘.VBP’ • Form Files • ‘.FRM’ • ‘.FRX’ • Modules • ‘.BAS’ • Custom Controls • ‘.VBX’ files • Save As... • Possible problem

  18. Visual Basic Environment- Using Context Sensitive Help • Context sensitive help is very useful • Select the item control that you want help on • Press the F1 key F1

  19. Command Button Select the command button from the toolbar

  20. Controls: Shape • A shape control allows you to‘draw’ on the screen • You can specify the: Shape Colours FillStyle

  21. Visual Separation of Controls

  22. Writing VB Programs • Plan the Program Tasks • Design User Interface • Set Properties • Write Code (Event Handlers) • Test and Debug the Program • Document and Distribute the Program