I am using Visual Basic 6 for this class. If you want to use a different version, please contact me. Thanks!

Slides:



Advertisements
Similar presentations
Super Logo Help Sheets…. Help Save Open Memory View Problems Projects Shortcuts Click on the labels to find out more about each icon!
Advertisements

What Was I Thinking??. Key Terms 1. Control 1. Control 2. Design Mode 2. Design Mode 3. Event 3. Event 4. Form 4. Form 5. Interface 5. Interface 6. Properties.
VISUAL BASIC Visual Basic is derived from the Basic language (Beginner’s All-Purpose Symbolic Instruction Code) Visual Basic uses an event-driven programming.
Text Box controls are used when users are required to type some input (during program execution), or output is displayed on the form (known as the user-
CVEV 118/698 Visual Basic Lecture 1 Prof. Mounir Mabsout Expert 1: Elsa Sulukdjian Expert 2: Walid El Asmar.
VB Code Statements 3 types of VB statement The Remark statement, known as comments, are used for project documentation only Begin with an apostrophe Not.
To type the VB code behind the command button (named cmdPush), Double-Click on the Push Me (caption) command button As a result the Visual Basic Code Window.
Introduction to Visual Basic Chulantha Kulasekere.
Adding Controls to User Forms. Adding Controls A user form isn’t much use without some controls We’re going to add controls and write code for them Note.
Chapter 1 P. 1 Writing Windows applications with Visual Basic Figure 1.1 The first program works as follows: (These operations can be performed in any.
1 Κατανεμημένες Διαδικτυακές Εφαρμογές Πολυμέσων Γιάννης Πετράκης.
06/10/ Working with Data. 206/10/2015 Learning Objectives Explain the circumstances when the following might be useful: Disabling buttons and.
Programming Examples to Accompany Structure Topic Please use speaker notes for additional information!
Basic Controls & Properties Chapter 2. Overview u VB-IDE u Basic Controls  Command Button  Label  Text Box  Picture Box u Program Editor  Setting.
Copyright © 2001 by Wiley. All rights reserved. Chapter 2: Using Visual Basic to Create a First Project Getting Started with VB Development Environment.
Chapter 3 Introducing Visual Basic
 Application – another name for a program.  Interface – is what appears on the screen when the application is running.  Program Code – is instructions.
Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.
SYSTEMSDESIGNANALYSIS 1 OO: Chapter 9 Visual Basic: Building Components Jerry Post Copyright © 1999.
New Project in Visual Basic Please use speaker notes for additional information!
Working with the VB IDE. Running a Program u Clicking the”start” tool begins the program u The “break” tool pauses a program in mid-execution u The “end”
Chapter Two Creating a First Project in Visual Basic.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
Data Types and Variables. Data Type! Computers are all about Data! Data can be in the form of Text Dates Sounds Pictures.
Standard Grade Programming using VB 1 Programming Visual Basic.
Vocabulary in VB So Far. Assignment: Used to change the value of an object at run time Used to change the value of an object at run time.
When I want to work with SQL, I start off as if I am doing a regular query.
1 Advanced Computer Programming Lab Calculator Project.
You should unzip and download the beginning programs.
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
Pay Example (PFirst98) Please use speaker notes for additional information!
Visual Basic I/O Programs (ProjRead1, ProjRead2, ProjWrite1, ProjPay) Please use speaker notes for additional information!
Lesson 4 Mathematical Operators! October 6, 2009.
1 CS 106 Computing Fundamentals II Chapter 210 “Adding Controls to User Forms” Herbert G. Mayer, PSU CS Status 7/4/2013 Initial content copied verbatim.
Maximum Profit Please use speaker notes for additional information!
Slide 1 Controls v Control naming convention –Label: lblName –Command Button: cmdName –Text Box: txtName.
Introduction to Matlab Module #10 Page 1 Introduction to Matlab Module #10 – Creating Graphical User Interfaces Topics 1.Overview of GUI Development using.
Calculator Program Explained by Arafa Hamed. First Designing The Interface Ask yourself how many places are there that will be used to input numbers?
Sorry, the pen lost control. Anyway, you need to download both the.vbp and the.frm for each project. I looked at PrCalc, I did not look at inventory.
Visual Basic A Quick Tutorial VB Review for ACS 367.
More Visual Basic!. Creating a Standalone Program A standalone program will allow you to make a program file that can be run like other Windows programs,
Adding Code to the Option Button. Open VB 1.Double click the Calculate button and select General from the Object list box. 2.Add the following code to.
Visual Basic 6 Programming Decide how many variables you need by looking at this form. There is one textbox for input and there are 3 labels for output,
21/03/ Working with Controls Text and List Boxes.
Subroutines (PrArith, Math,projCP1, PrAdrProc, PrAdrProcFunc) Please use speaker notes for additional information!
Using Forms and Form Elements In Visual Basic.NET.
An Introduction to Computers and Visual Basic
How to design a Windows Forms application
Working with Forms in Visual Basic
An Introduction to Computers and Visual Basic
Please use speaker notes for additional information!
Access Database for CIS17
In this class I am using Visual Basic 6 because it is easier to work with. If you want to use a different version please contact me. Thanks!
Creating and executing a program
Department Array in Visual Basic
Please use speaker notes for additional information!
Remember we are using Visual Basic 6 for this segment.
Using Access 2016 Since we are creating a new Access database, we need to select blank database.
We are starting to program with JavaScript
text box. I brought this up by double clicking on the command button.
and the properties. I named this lblName.
Access Database for CIT12
Visual Basic: Week 5 Review User defined functions
An Introduction to Computers and Visual Basic
I dragged over the label tool (A icon) and put it on the form.
If statements (Inven1, Inven2, Inven2a, Inven3, Inven3a)
Using screens and adding two numbers - addda.cbl
Introduction to Visual Basic 2010
GUI Programming in Visual Studio .NET
Presentation transcript:

I am using Visual Basic 6 for this class. If you want to use a different version, please contact me. Thanks!

These icons can be used to get the properties or tool box etc. Your setup should have the project window, the properties window, the tool box and the form. If they are missing, the icons above will make them available.

I changed the name property to say frmPay and the caption property to say Calculate Pay. Note that in naming things in VB, you use frm for a form, lbl for a label, txt for text boxes, cmd for command buttons etc.

The caption is a property of frmPay so I am changing frmPay.Caption

I clicked on the icon for label and brought it over and drew the label. Next, I will change the name to lblName and the caption to Name:

This shows the change to the name and to the caption.

Now I have brought over a text box and changed the name to txtName. I now need to scroll down in the property box and find the text property to take out the word Text1 from the box.

I want to eliminate text1.

Now the contents or text in the box is empty.

Now I have brought over another label and named and captioned it.

Another text box has been added and named txtPayHr. I need to scroll down to text and clear out the box.

Now I want to save, before I do that I am naming the project prjPay. When I save it the form with have a.frm extension and the project will have an.vbp extension. Both the form and the project need to be sent to me when you turn in an assignment.

Now I am bring over a command button. I need to name and caption it.

When I double click on the command button I bring up the area to write the code. Notice the sub and end sub. Notice also that this is the cmdCalc_Click() meaning when the button is clicked on this code will be executed.

Now I am starting to write the code. I want to change the text property in the txtPay text box to hold the result of a calculation shown on the next slide.

The formula is to take the text in the txtPayHr multiply by the text in the txtHrs and assign the answer to be the text in the txtPay field. txtPay.Text = txtPayHr.Text * txtHrs.Text

Now I am going to define a memory variable or work area. I will do that on the next slide with a Dim and I will name the work area wkOvt. I decided to make it an integer so I am only dealing with whole numbers.

I made a mistake here - I am testing wkOvt <= 40 and I really wanted to test txtHrs. Problem!

I am not doing tooooo well. I should have written txtHrs.Text in the IF statement and I wrote txtHours.Text which does not exist. Can't believe I did it!!!

It is now letting me know that there is a problem here because txtHours.Text does not exist. Would you believe I did this on purpose just to show you a mistake - NO - I don't believe it either. It was just another careless mistake!

Working with no overtime!!!

Finally working with overtime!!!!