vb chapters 11 12
Download
Skip this Video
Download Presentation
VB Chapters 11 & 12

Loading in 2 Seconds...

play fullscreen
1 / 11

VB Chapters 11 & 12 - PowerPoint PPT Presentation


  • 108 Views
  • Uploaded on

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 true ReadOnly set to true Scrollbar set to Vertical. TextBox Methods. inputTextbox.clear( ) inputTextbox.focus( ). Listboxes.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' VB Chapters 11 & 12' - olga-gilliam


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
vb chapters 11 12

VB Chapters 11 & 12

Security panel app chpt 12

textbox properties
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
textbox methods
TextBox Methods
  • inputTextbox.clear( )
  • inputTextbox.focus( )
listboxes
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))
hidden code
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
select case
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
case statements
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
case else
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
an example
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
adding stuff to a listbox
Adding Stuff to a Listbox
  • LogEntryListBox.Items.Insert(0, date.now & “ “ & message)
neat textbox stuff
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”
ad