VB This Exercise 6-1 - This Exercise 6-1, asks us to create...

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

View Full Document Right Arrow Icon
This Exercise 6-1, asks us to create an application that uses a sub procedure to calculate the Retail Price of an Item (Whole Sale Price + Mark up). It is a rather simple little exercise; but useful because it introduces us to functions and sub procedures. Although it is not necessary to do so, I have included second sub procedure to clear the form after calculation. Start Program Code Imports Microsoft.VisualBasic.ControlChars 'Class library Public Class Form1 Private Sub btnExit_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click Me .Close() 'Stop Program and Close form End Sub Private Sub btnClear_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click Clear() 'call the clear sub procedure End Sub Private Sub btnGetRetail_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetRetail.Click Dim RetailPrice As Decimal Dim numWS As Decimal Dim numMarkUp As Decimal Try numWS = txtWholeSale.Text
Background image of page 1

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

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

This note was uploaded on 11/09/2011 for the course COP 1332 taught by Professor Ryland during the Spring '11 term at American College of Computer & Information Sciences.

Page1 / 2

VB This Exercise 6-1 - This Exercise 6-1, asks us to create...

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