Download presentation
Presentation is loading. Please wait.
Published byWilliam Anthony Modified over 9 years ago
2
Class 2 Remote Instruction Review of Working with Buttons EDU 556 Programming for Instruction Dr. Steve Broskoske This is an audio PowerCast. Make sure your volume is turned up, and press F5 to begin. Click to advance as usual.
3
Use of Controls Text boxes allow us to gather information from users. Users can type into them. We can also output information to users through them. Labels allow us to present information to users. They are for output purposes only.
4
Common Properties of Controls Name: Provide a name for the control. – Ex: lblQuestion or txtAnswer Text: Text to be displayed on the control. Anchor: Select from left, top, right, bottom to allow the control to stretch as desired to fill the screen if it is resized by the user. Visible: Allow control to be visible or invisible. Backcolor: Change background color.
5
Naming Controls Answer appears here. lblQuestion1 btnShowAnswer1 lblAnswer1 Question appears here.
6
Coding the Appropriate Control No need to code the calendar. Code the two buttons, which will affect the calendar. MonthCalendar1.Visible = TrueMonthCalendar1.Visible = False
7
Coding the Appropriate Control Answer will appear here. Question appears here. This label will just be used to present info. to user. This label’s visible property will be initially set to false. Users will not see the answer when the form opens. lblShowAnswer1.Visible = True
8
An Alternative to Making Visible Answer will appear here after user presses button. Question appears here. This label’s visible property will be initially set to true, but we will not type anything into the text property initially. The button will change the text property. lblShowAnswer1.Text = “Put text to appear in label in quotes.”
9
Same Thing with a Text Box Answer appears here after user presses button. Question appears here. txtShowAnswer1.Text = “Put text to appear in label in quotes.”
10
Clearing Contents of a Text Box Question appears here. The user can type an answer here for later processing. This button will be used to clear the text property of the text box. txtStudentAnswer1.Text = “”
11
Navigating to Other Forms Private Sub btnGoForm2 Form2.show() Me.Visible = False To add a new form: Press “add new item” button – Windows form.
12
Remote Assignment Answer. Question 1.Question 2.Question. Answer. Reveal answer by changing visibility of text box. Reveal answer by changing visibility of label. Reveal answer by changing text property of label.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.