VB.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • djreality14
    Banned
    • Aug 2005
    • 177

    #1

    VB.net

    I'm currently making an extremly large program, and I'd like to know if there's a way to pull a variable from one form and use it in another. I've tried the SHARED and FRIEND functions, but neither of them work.
  • chickendude
    Away from Computer
    FFR Simfile Author
    • Sep 2003
    • 1901

    #2
    Re: VB.net

    I think you have to make it a global variable.
    I haven't used VB in a long time, so I'm not sure how, but that might be somewhere to start looking.

    Comment

    • deposition
      FFR Player
      • Feb 2004
      • 1115

      #3
      Re: VB.net

      This is exactly what modules are for. Any variable and any function, that is in the module, can publically be accessed as if it were a local object, the way you normally would. Just go to project, add module, and dimension the variable as global or public ie. "Global foovariable" or "Public foovariable".


      Most professionals put almost all of their functions and main variables for specific task related programs in here, so later, if they are working on a project in which they could use some of what they already wrote, they can easily import the module and call those functions.
      Last edited by deposition; 03-3-2006, 08:41 PM.

      Comment

      Working...