Sorry to have to start this out with, "I used to do this this way....", but it helps me learn this stuff...
Here is my problem. I have an image that keeps track of how many times it has been clicked on a form, because the image displays a different message every time it is clicked. So, what happens in the Click Event for this image is:
nNumClick = nNumClick + 1
DO CASE
CASE nNumClick = 1
WAIT "A Click Message" WINDOW TIMEOUT 5
CASE nNumClick = 2
WAIT "Another Click Message" WINDOW TIMEOUT 5
.
.
.
ENDCASE
The problem I am having is how to initialize the nNumClick. The only thing I have gotten to work so far is to put:
PUBLIC nNumClick
nNumClick = 0
in the Load event of the form. This works, but I hate the thought of creating a Public. I used to use Regional in 2.6, and this worked fine. But it does not work here. (Even if I declare it as "Local"
. I get the message: nNumClick is not a variable this way. I also tried putting nNumClick = 0 in the object's INIT EVENT, but that didn't work either... still received "nNumClick is not a variable" message.
Any thoughts???
Thanks,
-Scott
Here is my problem. I have an image that keeps track of how many times it has been clicked on a form, because the image displays a different message every time it is clicked. So, what happens in the Click Event for this image is:
nNumClick = nNumClick + 1
DO CASE
CASE nNumClick = 1
WAIT "A Click Message" WINDOW TIMEOUT 5
CASE nNumClick = 2
WAIT "Another Click Message" WINDOW TIMEOUT 5
.
.
.
ENDCASE
The problem I am having is how to initialize the nNumClick. The only thing I have gotten to work so far is to put:
PUBLIC nNumClick
nNumClick = 0
in the Load event of the form. This works, but I hate the thought of creating a Public. I used to use Regional in 2.6, and this worked fine. But it does not work here. (Even if I declare it as "Local"
Any thoughts???
Thanks,
-Scott