Click to See Complete Forum and Search --> : Multiple forms in a Pocket PC project


James Plisken
November 19th, 2004, 07:09 PM
I am using Visual Studio.NET 2003. Anyway, I am creating my first multiple form Pocket PC project, and I am having trouble accessing any variables from the first form of the project. I have 4 forms, and each one loads when I press a particular button. Example: Form 1 is the form that automatically loads once I open the program, and once inside this form I press a button and it takes me to Form 2, etc. I use the following method to open each form:

Dim secondForm As New form2
secondForm.ShowDialog()

Once I'm in the fourth form, I use the following lines to try to access the variables created in the first form:


Dim frm As form1
Dim x As Int32

x = frm.cuenta ' This is where I get a NullReferenced Exception

The variables in Form 1 are all global and public, but I still can't access them. I have tried using the debugger to get a clearer error message, but for some reason the debugger sometimes fails to load up. Please help.

rej005
December 29th, 2004, 08:21 AM
take that value in a textbox and call as following
form1.text1.txt
u can make the text1 invisible so no problem.....
i think it will work