Click here to Skip to main content
15,922,427 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

Also,

I Have an Application that Opens 1 form Numerous Times Depending on a Number the User Picks...

The Problem with it is that each time the Form Opens it Destroys the Variables(My Arraylist) and Creates it over...

What do i have to do so that it Keeps that Arraylist and all the Previous info in it?

Jp

Posted

Either show the same form over and over, or make those variables static.  Or perhaps store them in a seperate class that does it's own serialisation, and is a singleton, so all form instances can access the same data from there.

If you posted code, then I'd have made specific suggestions on how to change it.  If the 'info' includes the state of controls, then only showing the same form over and over instead of creating new ones will do the trick, unless you also write code to save and restore those states.

 
Share this answer
 

Thanks!

Il try that and send u the code tomorrow...

I duno where to comment on your Answer But Thanks :)

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900