Presentation is loading. Please wait.

Presentation is loading. Please wait.

2c – Textboxes and Buttons Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.

Similar presentations


Presentation on theme: "2c – Textboxes and Buttons Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming."— Presentation transcript:

1 2c – Textboxes and Buttons Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming

2 Textboxes Takes user’s text input Properties: –Name: txtYyyyy –Text: the value inside of the textbox –MaxLength: the maximum number of character users can enter –PasswordChar: character to display for password input –ReadOnly: the value cannot be changed

3 Buttons For users to click and let something happen Properties –Name: btnYyyyy –Text: the text on the button Button click event - an even that will happen when the button is clicked.

4 Buttons To define an event (what should happen when the button is clicked?) –Double clicking on the button on the design page will take you to the source code page. –The event frame work is created automatically. –You only need to fill in event details in the frame work, between “Private Sub buttonName_Click( …” and “End Sub”

5 Others MessageBox.Show() – used to create a pop-up message box to display some information. Whatever defined inside the () will show on the message box. Me – the current form, a handy way to find object names or tasks Blue wavy line on the code page – something is not right yet, either the statement is not finished or there is an error. Must make it go away before you run the program.

6 Others String concatenation sign “&” – connect short texts(strings) together to form a longer text. E.g. “Your name is “ & “Bob.” will become “Your name is Bob.”. Space inside the double quotes will be interpreted as spaces.


Download ppt "2c – Textboxes and Buttons Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming."

Similar presentations


Ads by Google