Please help with passing data from one form to another form

Hello!
I have a project to where I am making a pizza order for customers. My forms consist of a form for the pizza quantity and size (the cost is displayed in a lblDisplay.Text). I also have another form which calculates the cost of beverages.

I am now on the third form which calculates the cost of side items. I need to make it to where when the user clicks the submit button that the total of the side items is displayed along with adding the total of the pizzas and beverages of the other two forms. I dont know how to grab data from other forms.

I will give the method , regardless about your project take the method then apply it with any project

There two common methods is used for passing data between forms

The first one is by creating a properties in the form that you want to pass the data on it

for example if you have two forms the the first one (name it Form1) include one textbox control and button , and when pressing button you want to pass the textbox text to the second form (name it Form2)

the property shold be like :

Note these codes in Form2

Private _passedText As String
Public Property [PassedText]() As String
Get
Return _passedText
End Get
Set(ByVal Value As String)
_passedText= Value
End Set
End Property

Then , when you are declaring Object from Form2 you just set The Value before Showing the Form

in the Form1 and in Button1 Click event write these lines :

Dim Obj As New Form2
Obj.PassedText = TextBox1.Text
Obj.Show

by this way you have the text in the Form2 - variable _passedText

hope you get it , if you didnt I am here

The Second Method by Adding parameters to the Form that you need to pass the data on it in Sub New - I didnt like it , the Properties is better

I will give the method , regardless about your project take the method then apply it with any project

There two common methods is used for passing data between forms

The first one is by creating a properties in the form that you want to pass the data on it

for example if you have two forms the the first one (name it Form1) include one textbox control and button , and when pressing button you want to pass the textbox text to the second form (name it Form2)

the property shold be like :

Note these codes in Form2

Private _passedText As String
Public Property [PassedText]() As String
Get
Return _passedText
End Get
Set(ByVal Value As String)
_passedText= Value
End Set
End Property

Then , when you are declaring Object from Form2 you just set The Value before Showing the Form

in the Form1 and in Button1 Click event write these lines :

Dim Obj As New Form2
Obj.PassedText = TextBox1.Text
Obj.Show

by this way you have the text in the Form2 - variable _passedText

hope you get it , if you didnt I am here

The Second Method by Adding parameters to the Form that you need to pass the data on it in Sub New - I didnt like it , the Properties is better

Good Luck

Hi i tried this code and it really works.But without obj.Show it didnt.
Whats the function of obj.Show here?

Hi. so this is actually a continuation from another question of mine[Here](https://www.daniweb.com/programming/software-development/threads/506795/dynamically-add-values-into-datagridview-cell-from-listbox-vb2010) but i was advised to start a new thread as the original question …

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...