Thank you for your reply.  I didn't even know there was a Form_Show() event.  
When I right click on a form in the NS Basic IDE the Go To Event is grayed 
out.  If I right click on a button I can then get the events for the button.
 
I tried creating the Event in form 2  and placing the code in it as you 
suggested, but that didn't work either.  I'm wondering if I should uninstall NS 
Basic and download the software again. If there are Form Events shouldn't they 
show up when I right click on the form?
 
Is Form2_show() supposed to execute everytime I do ChangeForm(Form2)?
 
thanks,
 
Pat

   

________________________________
 From: George Henne <g...@nsbasic.com>
To: "nsbasic-ce@yahoogroups.com" <nsbasic-ce@yahoogroups.com> 
Sent: Thursday, June 28, 2012 3:36 AM
Subject: Re: [nsbasic-ce] Parameters between forms
   
Are you putting 

  Label2.textContent = myVar

inside of Form2_show()? If not, it is only being executed when the code is 
first loaded, not each time you show Form2.

George Henne                                    
NS BASIC Corporation
http://www.nsbasic.com 

>Greetings, I'm a newbie with NS Basic although I have been programming
>for many years. 
>
>Can anyone tell me how to pass values from one form to another.  Here is
>the code I am using.
>
>Form1:
>myVar = 10
>function Button1_onclick()
>  myVar = 3000 
>  ChangeForm(Form2)
>End function
>
>Form2:
>Label2.textContent = myVar
>
>Form 2 always displays 10 instead of 3000.
>I tried defining the variable in the Globals section but that did no
>good.  I tried using local storage and even putting it in the database,
>I still get the original value.
>
>My understanding is that a variable is considered global unless it is
>defined within a function.
>
>Any help would be much appreciated.
>This is app studio 2.5.0.3
>
>Thanks,
>
>Pat
>
>
>
>------------------------------------
>
>Yahoo! Groups Links
>
>
>



------------------------------------

Yahoo! Groups Links



    http://docs.yahoo.com/info/terms/

-- 
You received this message because you are subscribed to the Google Groups 
"nsb-ce" group.
To post to this group, send email to nsb...@googlegroups.com.
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en.

Reply via email to