Presentation is loading. Please wait.

Presentation is loading. Please wait.

VB Chapters 11 & 12 Security panel app chpt 12. Textbox Properties In the Interest Calculator we have a few new properties Multi-line property set to.

Similar presentations


Presentation on theme: "VB Chapters 11 & 12 Security panel app chpt 12. Textbox Properties In the Interest Calculator we have a few new properties Multi-line property set to."— Presentation transcript:

1 VB Chapters 11 & 12 Security panel app chpt 12

2 Textbox Properties In the Interest Calculator we have a few new properties Multi-line property set to true ReadOnly set to true Scrollbar set to Vertical

3 TextBox Methods inputTextbox.clear( ) inputTextbox.focus( )

4 Listboxes Allow users to select items from a list Users can add or delete items You must write code to add or remove items from a listbox paymentsListbox.items.clear( ) paymentsListbox.items.add(“months” & ControlChars.Tab & “monthly Payments”) gradesListBox.Items.Add(val(inputTextbox.Text))

5 Hidden Code You’re creating lots of code when you work with the GUI. To see this code click “show All Files” in the solution explorer and then click the + next to the DentalPayment.vb. Double click designer

6 Select Case Another option for selection Useful when there are many different options – it is a multiple selection statement Can take the place of layers of nested or stacked ifs. This is much preferred over too many nested ifs The expression following the keywords Select Case is called a controlling expression

7 Case Statements Conditions are checked in the case statements Multiple values tested in a single case statement are separated by a comma Bad Case Statement: Case 51 To 30 Here the case statement is ignored and may result in a logic error

8 Case Else Case Else can be helpful with error checking But be careful where you use it. Using it before any of your Case Statements results in a syntax error

9 An Example Select Case AccessCode Case Is < 10 message = "restricted access" Case 1645 To 1689 message = "technitions" Case 8345 message = "custodians" Case 9998, 1006 To 1008 message = "scientists" Case Else message = "access denied" End Select

10 Adding Stuff to a Listbox LogEntryListBox.Items.Insert(0, date.now & “ “ & message)

11 Neat Textbox Stuff The Text property of textboxes to access user input SecurityCodeTextBox.Clear( ) SecurityCodeTextBox.Text &= “2” PasswordChar : setting this property to * masks data enter in the textbox. Can prevent a user from modifying text in a textbox by setting enabled property to “false”


Download ppt "VB Chapters 11 & 12 Security panel app chpt 12. Textbox Properties In the Interest Calculator we have a few new properties Multi-line property set to."

Similar presentations


Ads by Google