Hi,
I'm writing a form to get numbers in order to calculate the price. if numbers and the code of business is wrong it will give me message box error.
The result will appear on a rich text box.
My professor wants me to set declare separate string variables to displaying text in the richtextbox.
MY QUESTION :For Boolean variable, assign false to Boolean variable, when user input is invalid. Display results in the richtextbox, when Boolean is true, BUT IF IT IS FALSE : don't display the result.
My out put doesn't calculate the function and don't know how to set the Boolean to not display the output!!
Please help!
Here is my Code:
I'm writing a form to get numbers in order to calculate the price. if numbers and the code of business is wrong it will give me message box error.
The result will appear on a rich text box.
My professor wants me to set declare separate string variables to displaying text in the richtextbox.
MY QUESTION :For Boolean variable, assign false to Boolean variable, when user input is invalid. Display results in the richtextbox, when Boolean is true, BUT IF IT IS FALSE : don't display the result.
My out put doesn't calculate the function and don't know how to set the Boolean to not display the output!!
Please help!
Here is my Code:
Code:
'Declare variables to store the output
Dim strOutOffice As String = "Microsoft Office Pro 2010:" & decTotalOffice.ToString("c")
Dim strOutVisual As String = "Microsoft Visual Sudio Pro 2010:" & decTotalVS.ToString("c")
Dim strOutQuick As String = "Intuit Quick Books 2012:" & decTotalQuick.ToString("c")
Dim strOutMaker As String = "File Maker Pro 2011:" & decTotalMaker.ToString("c")
Dim strGrandTotal As String = "Grand Total:" & decGrandTotal.ToString("c")
Dim blnAnswer As Boolean = True 'Declare a boolean as true
Process------
.
.
.
'Output ---------------------------------------
rtbSalesOrder.Clear()
rtbSalesOrder.AppendText(strOutOffice & vbNewLine)
rtbSalesOrder.AppendText(strOutVisual & vbNewLine)
rtbSalesOrder.AppendText(strOutQuick & vbNewLine)
rtbSalesOrder.AppendText(strOutMaker & vbNewLine)
rtbSalesOrder.AppendText(strGrandTotal & vbNewLine)
Comment