Ideas for vb.net

  • Thread starter Deleted member 11215
  • Start date
Best way would be to store the sequence pressed in a hidden list box or something. That way you can make it do calculations will multiple parts.
 
Harrypotter_fan said:
Decimal to hex,oct is easy
num=Hex(desiredNumber)
num=Oct(desiredNumber)
I know this.But i want to create functions for that.Just like colin did for Dec2bin and Bin2Dec.
 
try this wil -

Make two text boxes and store their values in 2 variables. Then make different buttons like + , - , * , / and write the function for each of them like + = a + b , - = a-b etc. :)
 
im only now realising how rubbish i am at vb.net :(.
 
i hardly understand any of the things that are said. for example i dont understand hwo to make the two things to make the - and + like kshitiz said.
 
Heres it in simpler form:
Code:
'This goes in general declarations
Dim a as Integer,b as Integer,Ans as Integer
'Make four command buttons with captions:(+)(-)(*)(/) respectively

Commandbutton1_click()    ' Button with caption (+)
a=textbox1.text
b=textbox2.text
ans=a+b
txtans.text=ans
End Sub

Commandbutton2_click()    ' Button with caption (-)
a=textbox1.text
b=textbox2.text
ans=a-b
txtans.text=ans
End Sub

Commandbutton3_click()    ' Button with caption (*)
a=textbox1.text
b=textbox2.text
ans=a*b
txtans.text=ans
End Sub

Commandbutton4_click()    ' Button with caption (/)
a=textbox1.text
b=textbox2.text
ans=a/b
txtans.text=ans
End Sub
 
but wouldnt that do it when i click the two buttons? i only want it to use 1 textbox. wouldnt that have 2 text boxes? then when you click the + button it would add. but that would eliminate the need for the = button that i want.
 
duded64 said:
but wouldnt that do it when i click the two buttons? i only want it to use 1 textbox. wouldnt that have 2 text boxes? then when you click the + button it would add. but that would eliminate the need for the = button that i want.

Heres the source code for it made by me
Click Here
 

Users who are viewing this thread

Top