170 likes | 335 Views
VB.NET Programming. Chapter 3. VB.NET. Starting the application Starting a new project Menus, Main Screen, Windows. Controls. Forms Frm name Back color Window State Text. Labels. Lbl Name Text TextAlign. Textboxes. Txt Name Text. Buttons (command buttons). Cmd Name Text
E N D
VB.NET Programming Chapter 3
VB.NET • Starting the application • Starting a new project • Menus, Main Screen, Windows
Controls Forms Frm name • Back color • Window State • Text
Labels • Lbl Name • Text • TextAlign
Textboxes • Txt Name • Text
Buttons (command buttons) • Cmd Name • Text • backColor
Listbox • Lst Name • Items • SelectedItem
Picture Boxes • Pic Name • Loading a picture (Image)
TabOrder/ Using shortcut Keys • TabIndex& before the letter (Alt)
Events Procedure-declaration statement Keywords/reserved words Comments/documentation
Commands • Exit • End • Clear • Text1.text = “” • Calculate • Answer = calculation • Val instead of string
Numbers Arithmetic operations (*, /, ^, +, -) Order of operations(L – R, (), ^, * /, +-) Scientific notation/e-notation Data types(double, integer, currency, string) Built-in functions(sqrt, int, round)
Strings • Declarations • Concatenation Built-in String Functions Length, ToUpper, ToLower, Trim Substring, IndexOf Empty String (Null string) Initializing a string to a value Line continuation character (&-)
Formatting Output Format Functions • Format Number FormatNumber (12345.678, 1) will output (12,345.7) • FormatCurrency (12345.678, 2) will output ($12,345.68) • FormatPercent (.123456, 2) will output (12.35%) percent • Formatting with Zones fmtStr as String = ”{0, 15}{1, 10}{2, 8}”
InClass Assignment Open the Chapter 3 Sample program Save this in a new folder with your name – DO NOT MODIFY THE ORIGINAL!!!! Add components and coding to get the user’s first name, middle initial, and last name. Concatenate and display the full name Declare and use variables for all of the inputted and outputted data Include code to calculate overtime (time and a half for hours over 40) Include code to subtract 25% of the gross pay for payroll taxes (round your answers) for NetPay Format output for currency.
Homework • Page 105, #49 Also include textboxes for the table number and the waiter’s first name. Concatenate and display the table number, first name as one value. Format the output in a listbox to display tablenumber/first name, total bill and tips 2. Pg 128, #5