Here's my code on the main form:
Private Sub mnuPrintBooks_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuPrintBooks.Click Dim printbooksForm As New frmPrintBooks ' Show the other form in model style. printbooksForm.ShowDialog() DisplayCharges() End Sub Private Sub mnuAudioBooks_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuAudioBooks.Click Dim audiobooksForm As New frmAudioBooks ' Show the other form in model style. audiobooksForm.ShowDialog() DisplayCharges() End Sub
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click Select Case lstPrintBooks.SelectedItem Case "I Did It Your Way" Selection = lstPrintBooks.SelectedItem Case "The History of Scotland" Selection = lstPrintBooks.SelectedItem Case "Learning Calculus in One Day" Selection = lstPrintBooks.SelectedItem Case "Feel the Stress" Selection = lstPrintBooks.SelectedItem End Select ' Let the user know the book has been added. MessageBox.Show("Print book added for " & lstPrintBooks.SelectedItem, "Book Added") End Sub
Module ShoppingCartSystemModule ' This Module contains the CalcTax Function. Const taxRate As Single = 0.06 ' Sales Tax Rate Public Function CalcTax(ByVal cost As Decimal) As Decimal ' This function calculates and returns the ' sales tax on ticket sales. The book cost is ' passed as an argument Return cost * taxRate End Function Public Selection As String = "" End Module
There's a total of 3 forms but I'm showing only the main form and the other one because if I can figure out how to add the books from the lstPrintBooks (second form) to the lstProducts (Main) then the 3rd form should be similar. I hope I not confusing anyone. I'm a beginner and I've tried many ways even a selection method.
I hope someone can help me. I would really appreciate it a lot.
Thanks in advance,
This post has been edited by 1uniquegeek06: 25 March 2007 - 06:22 PM