Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Visual FoxPro9 - Variable Declaring...  (Read 3877 times)

0 Members and 1 Guest are viewing this topic.

Archer

    Topic Starter


    Beginner

    Thanked: 11
    • Yes
  • Computer: Specs
  • Experience: Familiar
  • OS: Windows 7
Visual FoxPro9 - Variable Declaring...
« on: September 18, 2008, 11:35:20 AM »
   Greetings EveryOne (Or Should I Say AnyOne?___)!
   Please help me with VFP. Here's my question:
How do I declare a variable to make it Global WITHIN the Form?
Thank You very much.
良し! いこう! いこぜ みんな!

BC_Programmer


    Mastermind
  • Typing is no substitute for thinking.
  • Thanked: 1140
    • Yes
    • Yes
    • BC-Programming.com
  • Certifications: List
  • Computer: Specs
  • Experience: Beginner
  • OS: Windows 11
Re: Visual FoxPro9 - Variable Declaring...
« Reply #1 on: September 18, 2008, 11:43:54 AM »
I personally haven't used foxpro very much- but, if memory serves, a FoxPro form is simply a class, and all classes can have variables declared in the "declarations" section (before procedures). I don't know the syntax, however. (I assume you know how to declare a variable though, of course.)
I was trying to dereference Null Pointers before it was cool.

handsomee

  • Guest
Re: Visual FoxPro9 - Variable Declaring...
« Reply #2 on: September 30, 2008, 11:50:08 AM »
hello, I use fox pro to write all my commercial projects and programs. And i am happy to find someone who uses it.

To declare a global variable, u can do that by typing: PUBLIC variableName either in the INI Event of the for or module or control init or any where, but for easy sake, u can do that in the LOAD event and INIT event.

Pls, mail me if u have any problem, i am an expert in FoxPro. [email removed to prevent spam] I like to be ur friend byeee.
« Last Edit: September 30, 2008, 11:51:57 AM by Calum »

Archer

    Topic Starter


    Beginner

    Thanked: 11
    • Yes
  • Computer: Specs
  • Experience: Familiar
  • OS: Windows 7
Re: Visual FoxPro9 - Variable Declaring...
« Reply #3 on: January 22, 2009, 11:45:03 AM »
Guten Morgen, Handsomee.
Sorry I couldn't E-Mail you, your address is hidden for me.
As for your answer, I can declare the global variable. I cant make it global for all, for example, methods of ONE single form without throwing it to ALL forms, progs etc of my project. Or maybe I do not understand something?
« Last Edit: January 30, 2009, 01:56:24 AM by Archer »
良し! いこう! いこぜ みんな!