Class 2 Remote Instruction Review of Working with Buttons EDU 556 Programming for Instruction Dr....

11
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.

Transcript of Class 2 Remote Instruction Review of Working with Buttons EDU 556 Programming for Instruction Dr....

Class 2 Remote Instruction Review of Working with Buttons

Class 2 Remote InstructionReview of Working with ButtonsEDU 556 Programming for InstructionDr. Steve BroskoskeThis is an audio PowerCast. Make sure your volume is turned up, and press F5 to begin. Click to advance as usual.

Use of ControlsButtonsText 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.

Common Properties of ControlsName: Provide a name for the control.Ex: lblQuestion or txtAnswerText: 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.

Naming ControlsShow AnswerAnswer appears here.lblQuestion1btnShowAnswer1lblAnswer1Question appears here.

Coding the Appropriate Control

No need to code the calendar.Code the two buttons, which will affect the calendar.MonthCalendar1.Visible = TrueMonthCalendar1.Visible = False

Coding the Appropriate ControlShow AnswerAnswer will appear here.Question appears here.This label will just be used to present info. to user.This labels visible property will be initially set to false. Users will not see the answer when the form opens.lblShowAnswer1.Visible = True

An Alternative to Making VisibleShow AnswerAnswer will appear here afteruser presses button.Question appears here.This labels 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.

Same Thing with a Text BoxShow AnswerAnswer appears here afteruser presses button.Question appears here.txtShowAnswer1.Text = Put text to appear in label in quotes.

Clearing Contents of a Text BoxClear AnswerQuestion 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 =

Navigating to Other FormsPrivate Sub btnGoForm2 Form2.show() Me.Visible = FalseTo add a new form:Press add new item button Windows form.Next

Remote AssignmentShowAnswerAnswer.Question 1.ShowAnswerQuestion 2.ShowAnswerQuestion.Answer.Answer.Reveal answer by changing visibility of text box.Reveal answer by changing visibility of label.Reveal answer by changing text property of label.NextNext