Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 1 بسم الله الرحمن الرحيم Palestine Polytechnic University College of Administrative science and informatics Visual Basic 6
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 2 Lab1 SAMS: DAY2 Working With Visual Basic
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 3 Integrated Integrated Development Environment IDEIDEIDEIDE
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 4 VB Integrated Development Environment (IDE)
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 5 The New Project Window This window appears in the following cases: 1. When you start VB. 2. When you start New Project from the file menu.
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 6 The Title Bar The line at the top of the window which shows: 1. The project name. 2. The project status (Design, Run).
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 7 The Menu Bar Note: Each menu item has it’s own pull down menu which contains another menu items. Menu Item
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 8 The Tool Bar Contains buttons that performs specific tasks. To Show/Hide Tool Bar: View, Toolbars
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 9 The Tool Box It’s a collection of buttons called Controls that enables you to implement the graphical user interface. Types: 1. Standard: Built-in. 2. Professional: added to the project ( special file).
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 10 The Tool Box
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 11 The Form Window
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 12 The Form Window The background window that the user see during the program execution. The forms are given a default name Form1, From2… On the form you can place the controls from the toolbox required for the user interface.
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 13 The Project Window A window that lists all project files (Forms, modules… See Page 40 ) You can use the context window to Add, Save, Remove file.
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 14 The Properties Window Property Name Property Value
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 15 The Properties Window Lists the properties of the controls (objects). Each control and form has it’s own properties. Each property consists of : –Name. –Value. You can change the values in the properties window, and this is reflected automatically on the associated Control(Object).
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 16 The Form Layout Window Show a preview of the from window’s location at Run- Time. Screen Form
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 17 Placing Controls on the Form Ways: 1- Double-click the control you want from the ToolBox. 2- Choose the Control from the ToolBox, assign it’s place on the from.
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 18 Lab1 Training Part I: Examples 1- Design a VB project, to perform Greetings. 2- Saving the project.
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 19 Lab1 Training Part II: Questions Question I Start VB. Close the Form, Project, Properties, and Toolbox windows. Now perform the actions necessary to make each window appear on-screen.
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 20 Lab1 Training Question II Start a new project in Visual Basic. Delete any custom controls from the project. Add three text boxes and two command buttons. Change the Caption property of each button, Use whatever caption you want Change the Text property of the text boxes so that they are blank (Empty).
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 21 Lab1 Training Design the greeting interface as follow: When you click University Greeting, the message “Welcome to PPU University” will appear in the textbox. When you click College Greeting, the message “Welcome to Adm. College” will appear in the textbox. When you click End the program ends. Question III
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 22 Lab1 End