hi,
i have 2 txtboxes n 1 label, a division if performed wid txtbox1 and txtbox2, then the result displayed in a label.
How can i format the label to display it to 2 dp. my current code is as follows:
Public Class Form1
[INDENT][/INDENT]Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
Application.Exit()
End Sub
Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculate.Click
Dim GPE As Decimal = txtGPE.Text.Length
Dim CT As Decimal = txtCT.Text
If GPE >= 0 And GPE <= 120 And CT >= 1 And CT <= 30 Then
lblGPA.Text = GPE / CT
Else
MessageBox.Show("Please Check Data again")
End If
End Sub
End Class