Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display a C# message onlyonce

Tags:

c#

.net

winforms

I would like to make a C# application that displays a message when the program starts up, with a button that says "Don't show this message again".

When they click that button, how do I make it not display again the next time the program is ran.

Any and all help would be greatly appreciated.

Also, I'm unsure on how to show a message with a button in it (new to c#) so help on that would be appreciated also.

like image 532
Luke Berry Avatar asked Sep 09 '10 18:09

Luke Berry


2 Answers

You could save this choice in the user settings.

like image 155
Darin Dimitrov Avatar answered Nov 07 '22 23:11

Darin Dimitrov


You just need to record that setting somewhere that lives beyond the current life of the program.

You can use the Settings part of your project for this.

As for adding such a checkbox or whatever, you probably have to create a new form that looks like a message box.

like image 2
Lasse V. Karlsen Avatar answered Nov 08 '22 00:11

Lasse V. Karlsen