|
-
November 19th, 2004, 08:09 PM
#1
Multiple forms in a Pocket PC project
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:
Code:
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:
Code:
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|