[blind-it] Re: Beginning vb student needs help

  • From: "Charles E. Black" <charlesblackusc@xxxxxxxxx>
  • To: <blind-it@xxxxxxxxxxxxx>
  • Date: Wed, 5 Nov 2008 06:37:51 -0500

Sir,

Could you ask spacific questions sir.  We do not wish to evaluate your
entire program for you.  That takes away from the learning experience!  If
you ask spacific questions, perhaps someone could offer you a spacific
answer and explain why what you did doesn't work and why what they showed
you does.  I applaud your learning desire.  However, how much are you
learning by sending your entire code and having people to evaluate it.
Thanks!

 Charles E. Black
4127 Pinehaven Ct.
Columbia, SC  29205
Phone:  (803) 790-5586
Cell:   (803) 201-0499
Email:  charlesblackusc@xxxxxxxxx

-----Original Message-----
From: blind-it-bounce@xxxxxxxxxxxxx [mailto:blind-it-bounce@xxxxxxxxxxxxx]
On Behalf Of Marvin Hunkin
Sent: Wednesday, November 05, 2008 4:51 AM
To: blind-it@xxxxxxxxxxxxx
Subject: [blind-it] Beginning vb student needs help

Hi.
doing this book for a programming subject, and now need some help, not to do
my home work for me, but to give me pointers how to fix the problems and the
calculations.
or maybe point me to some good online examples.
really struggling, and need some help.
and please be gentle with me, tried looking at the msdn, help, and tried
searching on google and altavista for some simple examples, similar to this
case study, but could only find really complext examples.
so, if you could help me out, let me know either on or off list.
cheers Marvin.

ps: will post the project description and my code below.

Video Bonanza

Design and code a project to calculate the amount due
and provide a summary of rentals. All movies rent for
$1.80 and all customers receive a 10 percent dis-
count.
The form should contain input for the member
number and the number of movies rented. Inside a
group box, display the rental amount, the 10 percent
discount, and the amount due. Inside a second group
box, display the number of customers served and the
total rental income (after discount).
Include buttons for Calculate, Clear, and Exit.
The Clear button clears the information for the current
rental but does not clear the summary information. Do
not allow bad input data to cancel the program; in-
stead display a message to the user.


'Program:   VBVideos
'Programmer:    Marvin Hunkin
'Date:  Tuesday November 4 2008
'Description:   Keep track of video rentals


Public Class frmVBVideos





    'Declare  Module Level Variable.


    Dim intCustomerCount As Integer = 0








    Private Sub btnCalculateButton_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnCalculateButton.Click

        'Declare Variables.

        Dim intMembership As Integer
        Dim intVideoOrder As Integer
        Dim decRentals As Decimal = 2
        Dim decDiscount As Decimal = 0.1
        Dim decAmountDue As Decimal
        Dim decTotals As Decimal


        'Convert Variables.


        If IsNumeric(tbMembershipNumberTextBox.Text) Then
            intMembership = CInt(tbMembershipNumberTextBox.Text)
        Else
            MessageBox.Show("You Did Not Enter A Valid Numeric Value for
Membership Number.", "Data Error", _
                            MessageBoxButtons.OK,
MessageBoxIcon.Exclamation)
            tbMembershipNumberTextBox.Focus()
            Return


        End If


        If IsNumeric(tbVideoRentalNumberTextBox.Text) Then
            intVideoOrder = CInt(tbVideoRentalNumberTextBox.Text)
        Else
            MessageBox.Show("You Did Not Enter A Valid Numeric Value for
Number Of Video Rentals.", "Data Error", _
                            MessageBoxButtons.OK,
MessageBoxIcon.Exclamation)
            tbVideoRentalNumberTextBox.Focus()
            Return


        End If


        'Calculate Rentals.


        decRentals = decRentals * intVideoOrder
        decDiscount = decRentals - intVideoOrder
        decAmountDue = decAmountDue * decRentals
        intCustomerCount = intCustomerCount + 1
        decTotals = decRentals - decDiscount



















        'Format Text Boxes.


        tbMembershipNumberTextBox.Text = intMembership.ToString()
        tbVideoRentalNumberTextBox.Text = intVideoOrder.ToString()
        tbVideoRentalsTextBox.Text = decRentals.ToString("C")
        tbDiscountTextBox.Text = decDiscount.ToString("C")
        tbAmountDueTextBox.Text = decAmountDue.ToString("C")
        tbCustomerNumberTextBox.Text = intCustomerCount.ToString()
        tbTotalRentalsTextBox.Text = decTotals.ToString("C")
        tbMembershipNumberTextBox.Focus()


    End Sub

    Private Sub btnClearButton_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnClearButton.Click


        'Clear Text Boxes.

        tbMembershipNumberTextBox.Clear()
        tbVideoRentalNumberTextBox.Clear()
        tbVideoRentalsTextBox.Clear()
        tbDiscountTextBox.Clear()
        tbAmountDueTextBox.Clear()
        tbCustomerNumberTextBox.Clear()
        tbTotalRentalsTextBox.Clear()
        tbMembershipNumberTextBox.Focus()


    End Sub

    Private Sub btnExitButton_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnExitButton.Click


        'Exit the project.

        Me.Close()


    End Sub
End Class




_______________________________________________
The Blind-IT mailing list.

Archive at //www.freelists.org/archives/blind-it 

To unsubscribe, send an email to blind-it-request@xxxxxxxxxxxxx with the
word 'unsubscribe' in the subject.
_______________________________________________



_______________________________________________
The Blind-IT mailing list.

Archive at //www.freelists.org/archives/blind-it 

To unsubscribe, send an email to blind-it-request@xxxxxxxxxxxxx with the word 
'unsubscribe' in the subject.
_______________________________________________

Other related posts: