Presentation is loading. Please wait.

Presentation is loading. Please wait.

Visual Basic/ Visual Studio Brandon Large. Connecting to prior knowledge In your notes write down what the two main parts of the computer are. The “software”

Similar presentations


Presentation on theme: "Visual Basic/ Visual Studio Brandon Large. Connecting to prior knowledge In your notes write down what the two main parts of the computer are. The “software”"— Presentation transcript:

1 Visual Basic/ Visual Studio Brandon Large

2 Connecting to prior knowledge In your notes write down what the two main parts of the computer are. The “software” or the programs that tell the computer what to do can be created using the Visual Studio software and the Visual Basic Programming language

3 Visual Basic Terms Developers- people that are skilled in designing computer programs, and creating them using programming languages. Programming Language-a set of words and symbols that can be interpreted by computer software and executed by the computer. Visual Basic, C++, Java, are all Programming Languages

4 Terms Cont. Visual Basic programs are event driven programs which means that they can only be executed when the user performs an event. Event- Clicking a button, or typing into a textbox GUI-graphical user interface- a window that contains a variety of objects that can be displayed on a computer, smart phone, or tablet

5 Features of Visual Studio Software Title Bar- identifies the window, and the application open in the window. Menu Bar- displays the visual studio menu names. Standard Toolbar- contains buttons that execute frequently used commands. Toolbox- contains components to create the GUI Properties Window- contains the properties for all components placed on the GUI

6 Diagram

7 Commonly used Objects Button Label TextBox CheckBox RadioButton ListBox Timer RichTextBox PictureBox

8 Object Properties Text Property- allows you to change the text that is displayed on an object. Size Property- allows the user to change the size of an object. Name Property- first thing you do after adding an object to the GUI is change the name. (ex. lblHeading, frmPizzaSelection) Font Property- allows the user to change the font of an object.

9 Saving The first time you save a project you should click on “FILE”, “Save All”. As you work on a Visual Basic project, you have to save your work regularly. Every 10-15 minutes.

10 Data Types String- this data type is used for values that the user enters in a TextBox. String data types can store any character on the computer. Integer- Holds a nondecimal whole numbers in Visual Basic Decimal- represents large, or very precise decimal numbers. Boolean- a data type that Visual Basic interprets as either true or false.

11 Arithmetric Operator These are the calculations you can do in Visual Basic. +Addition -Subtraction *Multiplication /Division ^Exponentials

12 Output Format Specifiers ToString(“G”)- General ToString(“C”)-Currency ToString(“F”)-Fixed ToStringt(“N”)-Number ToString(“P”)-Percent ToString(“E”)-Scientific Notation

13 KeyWord “DIM” This keyword is used to indicate to Visual Basic that entries after the keyword Dim are defining a variable. Dim strNUmberOfSongs AS String

14 Decision Making Decision making is one of the fundamental activities of a computer program. You can write decision making statements in the code of a Visual Basic Program.

15 New Components Used from the ToolBox GroupBox- grp- associates items as a group, allowing the user to select one item from a group. RadioButton- rad- allow the user to make choices. Message Box- MsgBox.- reminds the user to enter the correct data type.

16 Conditional Statements Conditional statements- If…….then statements, that test whether or not a statement is true or false. If the button is checked(true), if the button is not checked(false). Looks like: If condition Then  Statement that is executed when the condition is true End IF

17 Example of Conditional Statement If intAge >= 18 Then lblVotingEligibility.Text = “You are old enough to vote” End If

18 If….Then…..Else Statements If…..Then…..Else Statements These are used to execute one set of instructions if a condition is true and another set of instructions if the condition is false. If condition Then Statement(s) that are executed if the condition is true Else Statement(s) that are executed if the condition is False End If

19 If…..Then…..Else Statement Example If intAge >= 18 Then lblVotingEligibility.Text = “You are old enough to vote” Else lblVotingEligibility.Text =“You are not old enough to vote” End If


Download ppt "Visual Basic/ Visual Studio Brandon Large. Connecting to prior knowledge In your notes write down what the two main parts of the computer are. The “software”"

Similar presentations


Ads by Google