Jump to content

cbox


Recommended Posts

Posted (edited)

There is a real simple way to make a real calculator, but I am having problems in vb6 (at school), hopefully I figure out a way to store infinite variables as they are typed.. (basically need the first variable, then the second variable...)

 

Public a As Integer = 0
Public b As Integer = 0

Public Sub Add()
 If Not TextBox.Text = "" Then
	 If IsNumeric(TextBox.Text) THen
		 If B= 0 Then
			 a = TextBox.Text
		 End If
	 End If
 End If
End Sub

 

This is about 3/4 of the req. code to Add numbers, I experimented with it a few times, it works as long as you deny access using e.KeyCode under the KeyDown area of the text box, you need to block Decimal, Subtract, and another one.

 

It's rather easy if I was to just sit there and program it, but I'm on vb break! LOL

Edited by Dark Slipstream

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...