VB Exercise 7-1 - Handles btnSelect.Click frmOpt.Show()...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Exercise 7-1 In this exercise we are asked to create a simple form to register participants for conference and calculate the cost. The exercise requires us to use two forms and pass data between them. It is a short little program that demonstrates creation and the use of two forms. Start Program Code Imports Microsoft.VisualBasic.ControlChars Public Class frmMain Dim frmOpt As New frmOptions Private Sub btnExit_Click( ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnExit.Click frmOpt.Close() Me .Close() End Sub Private Sub btnSelect_Click( ByVal sender As System.Object, _ ByVal e As System.EventArgs)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Handles btnSelect.Click frmOpt.Show() 'Shoe Option Form frmOpt.chkRegistration.Checked = False 'Clear Check Box frmOpt.chkDinner.Checked = False frmOpt.lstWorkShop.ClearSelected() 'Clear list bos 'Alternative method of clesring a list box 'frmOpt.lstWorkShop.SelectedIndex = -1 Me .Hide() End Sub Private Sub btnReset_Click( ByVal sender As System.Object, _ ByVal e As System.EventArgs) Handles btnReset.Click Dim objTxt As Control For Each objTxt In grpRegistrant.Controls If TypeOf objTxt Is TextBox Then ' clear the text objTxt.Text = "" End If Next lblTotalCost.Text = "" End Sub End Class...
View Full Document

Page1 / 2

VB Exercise 7-1 - Handles btnSelect.Click frmOpt.Show()...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online