CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2004
    Posts
    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.

  2. #2
    Join Date
    Dec 2004
    Posts
    15

    Re: Multiple forms in a Pocket PC project

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured