Arbs001

ok, from the threads i saw, they mentiond SQL servers and stuff

heres my program

im creating a claulator that will add, subtract, multiply, divide and store your alst answer so that when you click a button, it shows the answer in a msgbox.

now, how can i store the last answer so that when i click "last answer" it pops up

heres my code so far

Code Snippet

Private Sub TextBox5_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox5.TextChanged

End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click

TextBox5.Text = total

End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click

TextBox1.Text = Nothing

TextBox2.Text = Nothing

TextBox3.Text = Nothing

TextBox4.Text = Nothing

TextBox5.Text = Nothing

End Sub

Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click

MsgBox(total)

End Sub

End Class

ok, textbox 5 is the total, which is what i want stored

button 7 displays the saved total in a msgbox

button6 stores it

and button 5 clears the total

i want button6 to store it so that i can recall it with button 7




Re: Visual Basic Express Edition storing a variable simply

js06

This thread might help you straighten it out

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=2143660&SiteID=1






Re: Visual Basic Express Edition storing a variable simply

Arbs001

not really

i dont calculation flags or anything

heres what im trying to do

the person puts in 3 in the frist box, and 5 in the second

hits the Plus button

the total box shows 8

ok, that is how i get there, irrelevent to my question

my question is, is that when i click the store button, how can it store an 8 so that when i click clear and then click the last answer button, it shows 8, even though there is nothing in the total box

its really really simple, its jst not working for me






Re: Visual Basic Express Edition storing a variable simply

Arbs001

never mind

i just thought of 2 ways i could do it

1) make the intended operation the variable, and make the total box siplay the variable, so that when the total box is cleared, the variable still holds the number

or

2) create an invisible textbox that also recieves the answer, and then just have the visible textbox get cleared, and not the invisible one

so, question is answered by me






Re: Visual Basic Express Edition storing a variable simply

js06

I am starting to think that all of you fresh students are confused.

And that you answered your own question is good even though i gave you the answer before you thought of it.

I am guessing that either you didn't understand all of what was in the other thread or more likely you did not read all of it.

Or it took a while for it to sink in.

But either way, glad you found your answer.

I think you new students need to start paying attention to your instructor because i am really finding it hard to believe that this information is not covered in class. And if it is a matter of not getting the info because the class is so large, your way in the back and the other students around you are talking then maybe it's time to do something about that now.

I think it shows that you are atleast looking for resources to find your answer that you are here but don't you have textbooks

And last thing, go to your instructor and talk to him/her about your deciding to use a hidden textbox to store the data.

This is why i question your response here because these are the exact things that were gone over in the thread link that i gave you.

I am merely trying to help you out so take what i have said here as such and pay closer attention to what you read.

And make sure that you actually read what you see.

Hope this helps you in the future






Re: Visual Basic Express Edition storing a variable simply

ReneeC

Jeff,

You're starting to sound like a Devo!!!!!!!!!!