It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

tranfer the value of sum

Moderator: dafunkymunky

tranfer the value of sum

Postby phaeight on Mon Jul 11, 2011 5:01 pm

hello,

i would like some help for me to transfer the value of sum in form 1 to form 2.

here is my code:



Public Class Form1
Dim secondform As New Form2
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim num1, num2, sum As Integer
num1 = TextBox1.Text
num2 = TextBox2.Text
sum = num1 + num2


secondform.Show()
End Sub
End Class<br/>





i need answer ASAP, please......
phaeight
 
Posts: 1
Joined: Mon Jul 11, 2011 4:56 pm

Re: tranfer the value of sum

Postby mangaluli on Fri Sep 16, 2011 1:43 pm

1. Create a module
2. Go to module
3. Write this:
"Public num1,num2,num3,LickMe,icecream,etc as integer
4.Thats it you declared public values that you can access and change whenever and from wherever you are. :)
5.Profit

P.S
A module is like a form etc you add it by Project>Add Module...
mangaluli
 
Posts: 3
Joined: Fri Sep 16, 2011 11:25 am


Who is online

Users browsing this forum: No registered users and 2 guests