"Don't Show Again" Feature on Form

  • Thread starter Thread starter Grumpy Aero Guy
  • Start date Start date
G

Grumpy Aero Guy

I would like to add functionality to a form that contains a check box with
which the end user can check it so that this particular form won't appear
again.

I. e., a "Don't show this form again" box.

What approach is generally recommended to implement such functionality. A
general approach would be appreciated...I can probably get there if I knew
where to start... I'm totally blacking out on ideas here.

Thank you all for your time and input---It is appreiciated in advance.
 
1) Keep a Boolean stored in a config file to track this selection. Probably
be best to place the file in the users local storage area.

....or...

2) Track the selection in the registry somewhere, preferable again in the
user specific area.
 
Dear Frank Bachman,

If I am correct, you should only need to place a checkbox on the form and
remember the checkedstate in the exit form-event.
With remember I mean store it somewhere so that you can retrieve this state
later. You can store this in a database, in a text file or in the registry,
to name a few places. Where you then normally would open this form, you now
first check to see if the stored value is 'checked'. If it is checked, then
you shouldn't open the form, otherwise you should.

I hope I have answered your question there,

Michel van den Berg
 
This is a simple configuration file system.

Save an XML file in the local directory with the settings of your user
choices.

If desperate you could also take a retrograde step and go back to using the
Get / Set PrivateProfileInt or PrivateProfileString API.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
I really wish programmers would store stuff like this in a config file and
not the registry as I don't like programs filling up my registry with program
specific junk!. Just my thoughts on the matter.
 
Lots of GREAT info. I was trying to avoid registry entries for reasons
eloquently stated above......

THANK YOU ALL VERY MUCH......

I guess I have another little programming experiment/project to play with
for a while.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top