Hi! I know almost nothing about
VB.NET. I just installed its BETA edition.. I wish to make a program whose details I am giving below.. I have already made this program successfully in VB6 but in
VB.NET, I am stuck. Please suggest the code..
--------------------------------------------------------------------
Actually, I am making a calculation program. There are seven subjects whose marks are to be entered. The program should then add all of them to give the total. The program should also calculate the percentage and show it.
In
VB 6, I used Textboxes to enter marks and put a Label for Total and Percentage. I put the following code in the command button for calculating:
****************************************
Private Sub OK_Click()
e = Val(eng.Text)
m = Val(maths.Text)
ss = Val(ss.Text)
s = Val(sci.Text)
g = Val(guj.Text)
c = Val(com.Text)
o = Val(opt.Text)
t = e + m + ss + s + g + c + o
a = t * 100
p = a / 700
mrks.Caption = Str$(t)
percent.Caption = Str$(p)
End Sub
****************************************
Here: the command buttons name is OK..., 'e', 'm', 'ss', etc are name of text boxes used for filling numbers.. 't' is total and 'p' is percentage..
----------------------------------------------------------------
Now, what modifications should I make in this code which will be used in
VB.NET.. When, I used the above code in
VB.NET the program suggested a lot of errors..
>> Siddhartha