Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
35 views
Intro To Visual Basic
Visual basic quick review handout for o level students
Uploaded by
m41375112
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Intro to Visual Basic For Later
Download
Save
Save Intro to Visual Basic For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
35 views
Intro To Visual Basic
Visual basic quick review handout for o level students
Uploaded by
m41375112
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Intro to Visual Basic For Later
Carousel Previous
Carousel Next
Save
Save Intro to Visual Basic For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 21
Search
Fullscreen
No Goggle, VB is, ja jjecle more advanced than Small atc jusclike Wordpad is more “yavanced chan Notepad. NATE Pi Goggle Me Can you explain, more about VB to me, Toggle? - No, Toggle! Today =" ma'am told us we will be learning about a new software called Visual Basic. [know about Small Basic Are, “...__ the two very different? _. oo You have learnt quite a bit of Small Basic by now. As you know, Small Basic programs are executed one command after another (i.e. sequentially). You type in the commands (or methods) and you see the output of a program in a TextWindow (working with text) or a GraphicsWindow (working with lines and shapes) object. Visual Basic (VB) is similar to Small Basic but has many more BDRM en eeay ies r fretne EW erie ian eases features. Visual means that it uses a Graphical User Interface (GUI) to create programs, and Basic means that the language is based on the BASIC programmin language. In this chapter, you will learn Visual Basic 2013 Bx re i i) ess. Iti Microsoft supplies free for students and beginners, i “vecescal USER INTERFACE ic has a Graphi bl sa Graphical User Interface ( "windows icons, buttons, menus, ai ems written with Visual Basic ha Hl ve a ane (GUD boca ote ame suagests, GUI software Sree All these are called controls. All User Interface. So Visual Basic has a GUI ogt@l fi sd iron" for writing programs, ent priven Programming al Basic programming is event-dri si the mouse, double-cli nt-driven programming. A F ickiN8 7 Clicking the mouse. a 1B. Re event is an action. For example, i ing the mouse, sel i set performs an action on , selecting an item from a list, jreall actions. When the u ent has occurred. a graphical component, we say an wvent-driven programming, sll Basic. The user ee eae Tesponds to events. It does not run step-by-step as pendently: We write the code @n any eontol at anytime, so each contri programmed i will be executed in response to different actions (events). i TING STARTED WITH VISUAL BASIC art Visual Basic, the steps are: Click Start > All Programs (Fig. 5.1(a)] > Visu: 4 a al Studio 2013 5. I for Desktop IFig. 5.1(0)l- dio 2013 [Fig. 5.1(b)] > VS Express 2013 Fig. 5.1 Steps to start VS Express 2013 for Desktop >. The Visual Studio screen appears (Fig. >): Microsoft Visual Studio After a few seconds, the Start Page — indow appears (Fig. 5.3)- Express 2013 for Windows Desktop wi Fig, 5.2 Visual StudioALE com view PROIECT - 6/8 sat! Search Toelbox All Windows Forms 4 Common Controls he Pointer @ Button CheckBoe CheckedListBox ComboBox. DateTimePicker B a A ube A a LinkLabel UstBox Lstview (Qs MaskedTetBox © MonthCalendar Fig. 5.6 IDE window with Toolbox Click the Pin the tab button, the form will move to the right so that the Toolbox ang thes are visible together (Fig. 5.7). ick Laun tC PRY Het icrosot Visual Studio Express 213 for Windows Desktop CCR Quick Launch (Ce FILE EDIT VIEW PROJECT BUILD DEBUG TEAM TOOLS TEST WINDOW HELP ~8- 9/8 S/O -C-| > sun- [oa J[ayou__-|| Bele S > 9 x SORE’ Search Toolbex » All Windows Forms 4 Common Controls Pointer Button CheckedListBox B Combobox EE DateTimevicker,ponents of the Visual Basic Windo i wy om veer Ow has many components jn Figure > Figure 5.6, Ns, asyoutan ase Top Tip par: The title bar at the to of the project (Fig. 5.8). By neat 4 dowsApplicationl, WindowsApy fi wo here tS ‘Hello’ as per the ae é nt 5.071 Page 69: Be ino displays the Names your projects ation2, etc. The name we had made in Hello - Microsoft Visual Studio Express 2013 for Windows Desktop as | a Fig. 5.8 Title Bar Above the Form: The tab at the t l i (op of the form contains th Fomivopaan = *) mt and [Design]. This means that the application has be ‘oie cl urently in Design mode (Fig, 5.9). raleoie b ig. 5.9 Form tal Bar and Toolbar: TI : a ofthe menubar ae consists of many drop-down menus. Clicking on any ra options (Fig.SH10) ive. The toolbar has buttons that provide shortcuts to some ept VIEW PROJECT BUILD DEBUG TEAM FORMAT TOOLS TEST WINDOW HELP. co O/B EM MID Co) bSet-oan vou iia tele = ed Fig. 5.10 The Menu bar and Toolbar m Window: The Form window is the primary rk area that forms the background of the lication. The user can place objects on the form 511). | box; The Toolbox contains the controls. Controls GUI components that can be added to the form. e commonly. used controls are Label, Button, mboBox, ListBox, PictureBox, and TextBox The Solution Explorer window rent project Fig. 5.11 Form window Top Tip perties Window: A form can have many controls h some properties. it. Every control is associated witve a VB The steps to create, execute, and sa’ application that does this are: New _ on the Start pase The 1. Click New Project. Project window appears. Under Installed > Templates, oer Select Windows Forms Applicatio “pete pane. At the bottom of this Coy oa 3 default project name WindowsAPPIIC* "Ay and click OK. some other name, say Message, The IDE window will appear. . Notice the name of the project, title bar. The project has one form, nam by default. Make sure Formt is selected. 4. Add a Button control to the form. Select the form and make the following changes in the Properties window: * To change the title displayed on the form: the box to the right of Text in the Properties window and type Message (Fig. 5-19). Notice that it appears on top of the form. © To change the background colour of the form: Click the box to the right of BackColor. A drop-down menu arrow will appear. Click the arrow and select Highlight (Fig. 5.20). 6. Select the button control by clicking it, and make the following changes in the Properties window: * Change Text to DisplayMessage (Fig. 5.21). * Click the box to the right of Font, and then on the button with three dots (Fig. 5.22). The Font window will appear (Fig. 5.23). Set Font to Tahoma, Font style to Bold and Size to 12. Click OK. Notice that the default font is Microsoft Sans Serif. 7. Follow these steps to write the code: * Double-click the button control. The code Is) Message, in the ed Form! w wi m: Click item Windows Feo For renrjenl eae z rrotetLayout False right a eau False Folze plow 0¥0P ‘autoValidate: Enable, ContetMenutP (cone) poublebutered Falce Enabled Toe 7 ert raced wit the conte Fig. 5.19 Text property of Cet Ee oo = ae rn een Cursor EB GrayTet To ightightTet BackColour HB HotTrack Fig. 5.20 BackColor proj Button System. Windows Forms Button le le |e ImageKey, TG one, Imagelist (none) RightToLeft No The test associated with the control, Fig. 5.21 Text propel window will appear (Fig. 5.24), Italready has a code template. You will ad code to this.Private stb] Due oni GHice ccemten fet eem ati ( 7 End Sub As EventArgs) Handles Buttont.click Fig. 5.24 The code window | ° ‘Type the code between the lines Private Sub and End Sub as shown in Figure 5.25. ublic Class Form) Msglox("Visual Basic is interesting!”) i Private Sub Buttonl Click(sender As Object, e As Eventargs) Hondles Buttton1 Click |___end_sub Fig, 5.25 Visual Basic code . To save the VB application, select FILE > Save All. This first saves the form and then the project. The file extension for forms is vb. The extension for projects is .vbpro). lication, Click DEBUG > Start Debugging. Or Press F5. Or Click th To run the aj wren [ge on the toolbar. p. This will run your first Visual Basic labeled DisplayMessage will appe isplay a message box stating Visual ve Start program. A form titled Message with a single button ar on the screen (Fig. 5.26). dit will d | Basic is interesting} (Fig. 5.27).10 2, Click B 2 C | ress 3, The TV pAKING WITH VARIABL les + shot + must noqh jingle t hold: um! IK m: ilu lent. The general lent statement isual Basic but W' il sles in one line, separa? « Integer, Percentage ariable of the same d: Integerhe cursor WI II be | Vote: Data umber so th Pre sum of. window are t ‘toolbar, the Propertie windowition Explorer ii ents of the Visual Basic II
You might also like
Lecture 1 PDF
PDF
No ratings yet
Lecture 1 PDF
8 pages
Visual Basic
PDF
No ratings yet
Visual Basic
83 pages
Visual Basic2
PDF
No ratings yet
Visual Basic2
79 pages
Second Lecture Programming in Visual Basic: Page11 - 32
PDF
No ratings yet
Second Lecture Programming in Visual Basic: Page11 - 32
11 pages
Visual Basic 2015
PDF
No ratings yet
Visual Basic 2015
40 pages
By The End of This Practical Section, The Students Should Be Able To
PDF
No ratings yet
By The End of This Practical Section, The Students Should Be Able To
23 pages
Class VIII Computer Science Week 1 PPT-converted 2020
PDF
No ratings yet
Class VIII Computer Science Week 1 PPT-converted 2020
19 pages
At The Momenet There Is No Freeware Version of Visual Basic Available: - (
PDF
No ratings yet
At The Momenet There Is No Freeware Version of Visual Basic Available: - (
7 pages
Unit 2
PDF
No ratings yet
Unit 2
40 pages
Visual Basic 6.0 Manual
PDF
100% (1)
Visual Basic 6.0 Manual
83 pages
Visual Basic Lab Manual
PDF
60% (5)
Visual Basic Lab Manual
18 pages
Self - Learning Module - 1 - Q4
PDF
No ratings yet
Self - Learning Module - 1 - Q4
7 pages
Visual Basic Book'
PDF
No ratings yet
Visual Basic Book'
83 pages
vb-ch1 1
PDF
No ratings yet
vb-ch1 1
21 pages
Microsoft Visual Basic 6.0: Applied Science
PDF
No ratings yet
Microsoft Visual Basic 6.0: Applied Science
54 pages
Introduction To Visual Basic.
PDF
No ratings yet
Introduction To Visual Basic.
13 pages
VB Notes
PDF
No ratings yet
VB Notes
21 pages
فيجول بيسك
PDF
No ratings yet
فيجول بيسك
60 pages
SummarySlideshow Chapter5
PDF
No ratings yet
SummarySlideshow Chapter5
51 pages
Microsoft Visual Basic 6.0: Applied Science
PDF
No ratings yet
Microsoft Visual Basic 6.0: Applied Science
52 pages
VB 1-5 Unit - 240620 - 220336
PDF
No ratings yet
VB 1-5 Unit - 240620 - 220336
48 pages
Visual Basic Express 2013
PDF
No ratings yet
Visual Basic Express 2013
9 pages
VB Lecture 1
PDF
No ratings yet
VB Lecture 1
42 pages
Statistics Hand written
PDF
No ratings yet
Statistics Hand written
27 pages
Visual Basic Programming
PDF
No ratings yet
Visual Basic Programming
12 pages
Visual Basic Basics notes
PDF
No ratings yet
Visual Basic Basics notes
339 pages
Structure of A Visual Basic Application
PDF
No ratings yet
Structure of A Visual Basic Application
12 pages
Microsoft Visual Basic 2012: Chapter One
PDF
No ratings yet
Microsoft Visual Basic 2012: Chapter One
40 pages
Visual Basic 6..A Hand Book
PDF
100% (7)
Visual Basic 6..A Hand Book
45 pages
To Visual Basic: Prepared By: Mercy Ann G. Giere
PDF
No ratings yet
To Visual Basic: Prepared By: Mercy Ann G. Giere
20 pages
Visual Basic 1
PDF
No ratings yet
Visual Basic 1
70 pages
LESSON1-INTRO-TO-VISUALBASIC-1
PDF
No ratings yet
LESSON1-INTRO-TO-VISUALBASIC-1
59 pages
Myvbprog
PDF
No ratings yet
Myvbprog
9 pages
Visual Basic 6.0
PDF
No ratings yet
Visual Basic 6.0
9 pages
Visual Basic Manual
PDF
No ratings yet
Visual Basic Manual
101 pages
Visual Basic
PDF
No ratings yet
Visual Basic
36 pages
DMC1947
PDF
No ratings yet
DMC1947
242 pages
Contents: Visual Basic Introduction To Visual Basic
PDF
No ratings yet
Contents: Visual Basic Introduction To Visual Basic
66 pages
النسخة الكاملة لمحاضرات VB6
PDF
No ratings yet
النسخة الكاملة لمحاضرات VB6
54 pages
VB Notes
PDF
No ratings yet
VB Notes
60 pages
Visual-Basic-1
PDF
No ratings yet
Visual-Basic-1
5 pages
How To Start Using Visual Basic
PDF
No ratings yet
How To Start Using Visual Basic
20 pages
Lesson 1 Visual Basic
PDF
No ratings yet
Lesson 1 Visual Basic
34 pages
Gui Programming Notes (1-5)
PDF
No ratings yet
Gui Programming Notes (1-5)
152 pages
Software Development With Visual Basic B.com Ca
PDF
No ratings yet
Software Development With Visual Basic B.com Ca
122 pages
Starter Guide Visual Basic RCX
PDF
No ratings yet
Starter Guide Visual Basic RCX
150 pages
Visual Basic Tutorial
PDF
No ratings yet
Visual Basic Tutorial
23 pages
Gui Programming Notes (1-5)
PDF
No ratings yet
Gui Programming Notes (1-5)
151 pages
Introduction To Visual Basic
PDF
No ratings yet
Introduction To Visual Basic
27 pages
VISUAL BASIC Is A High Level Programming Language Which Evolved From The Earlier
PDF
No ratings yet
VISUAL BASIC Is A High Level Programming Language Which Evolved From The Earlier
3 pages
VB Notes
PDF
50% (2)
VB Notes
14 pages
VB1
PDF
No ratings yet
VB1
56 pages