remember variable when form reloads
remember variable when form reloads
remember variable when form reloads
remember variable when form reloads
remember variable when form reloads
remember variable when form reloads remember variable when form reloads remember variable when form reloads remember variable when form reloads remember variable when form reloads remember variable when form reloads remember variable when form reloads remember variable when form reloads
remember variable when form reloads remember variable when form reloads
remember variable when form reloads
Go Back  Xtreme Visual Basic Talk > > > remember variable when form reloads


Reply
 
Thread Tools Display Modes
  #1  
Old 10-20-2005, 02:42 AM
kemel kemel is offline
Freshman
 
Join Date: Oct 2005
Posts: 26
Default remember variable when form reloads


Hey,

If you're programming in asp.net, you can store variables in cache,... so they won't 'be forgotten' any time a form loads. Is there a way to achieve this too if you're making a windows application?

Greetz
Reply With Quote
  #2  
Old 10-20-2005, 02:50 AM
gigemboy's Avatar
gigemboy gigemboy is offline
Centurion
 
Join Date: Oct 2005
Location: College Station, TX
Posts: 156
Default

You can either store it in the registry, or write it yourself to a text file in the app directory, and read the text file on form load to set the value...

I'm assuming you mean store it when exiting in order to pull it up when the app is ran again....?
__________________
NOTE: My code will usually get the job done, but it is not the prettiest. If you see of a way to make it more efficient or to look more elegant, please feel free to comment on it :) Im still learning...
Reply With Quote
  #3  
Old 10-20-2005, 04:58 AM
kemel kemel is offline
Freshman
 
Join Date: Oct 2005
Posts: 26
Default

Not exactly, i meant a way to store a variable that still is stored, even when the form (where the variable is declared) unloads (but other form are still active then, so the app didn't end.

Thx anyway
Reply With Quote
  #4  
Old 10-20-2005, 06:33 AM
abwindsor abwindsor is offline
Newcomer
 
Join Date: Oct 2005
Location: Windsor, Ontario, Canada
Posts: 19
Default

Just add a module to your project and store any persistent values as public variables in there.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
remember variable when form reloads
remember variable when form reloads
remember variable when form reloads remember variable when form reloads
remember variable when form reloads
remember variable when form reloads
remember variable when form reloads remember variable when form reloads remember variable when form reloads remember variable when form reloads remember variable when form reloads remember variable when form reloads remember variable when form reloads
remember variable when form reloads
remember variable when form reloads
 
remember variable when form reloads
remember variable when form reloads
 
-->