Tag Archives: registry

Get the computer’s registered owner and organization in C#

In Windows 98, the system’s registered owner and company name is stored in the following Registry keys: SOFTWARE\Microsoft\Windows\CurrentVersion\RegisteredOwner SOFTWARE\Microsoft\Windows\CurrentVersion\RegisteredOrganization In Windows NT and later, the registered owner and company is stored in the following keys: SOFTWARE\Microsoft\Windows NT\CurrentVersion\RegisteredOwner SOFTWARE\Microsoft\Windows NT\CurrentVersion\RegisteredOrganization This … Continue reading

Posted in registry, system | Tagged , , , , , , , , , | Leave a comment

Write values in the Registry in C#

The example Read Registry values (to get the desktop icon size) in C# shows how to read values from the Registry. This example shows how to write values into the Registry and uses that ability to refresh the desktop icons … Continue reading

Posted in registry, system | Tagged , , , , , , , , , , | Leave a comment

Add ComboBox choices at runtime in C#

This example lets you add ComboBox choices when the user selects them at runtime. To keep track of the choices for future use, it saves them in the Registry. The example Easily save and restore a form’s settings in the … Continue reading

Posted in controls, user interface | Tagged , , , , , , , , , , , , , | Leave a comment

Display an end user license agreement (EULA) in C#

Many program display an end-user license agreement (EULA) when they are installed or the first time they are run. This example uses a form called EulaForm to display a RichText format EULA file. The form returns DialogResult.OK if the user … Continue reading

Posted in forms, programs, registry | Tagged , , , , , , , , , | Leave a comment

Make a password manager in C#

Before I discuss this example, let me make a disclaimer and say that I can’t guarantee this application’s performance. I think it is secure but for something as important as passwords you need to merely use this program as an … Continue reading

Posted in algorithms, cryptography, mathematics, registry, system | Tagged , , , , , , , , , , , , , , , , , , , | 2 Comments

Use cryptographic methods to generate random passwords in C#

Lately I’ve gotten more than a little tired of having to generate random passwords that obey all sorts of stupid rules for various web sites. Who cares if I use a strong password on a web site that just sends … Continue reading

Posted in algorithms, cryptography, mathematics, system | Tagged , , , , , , , , , , , , , , , , , , | 1 Comment

Use a cryptographic random number generator in C#

The Random class generates random numbers, but they aren’t cryptographically secure. What does “cryptographically secure” mean? It means that an attacker, after seeing a series of random numbers that you generate, cannot predict the next one with any success. This … Continue reading

Posted in algorithms, cryptography, mathematics | Tagged , , , , , , , , , , | 6 Comments

Easily save and restore a form’s settings in the Registry in C#

This example shows how you can easily save and restore all of a form’s settings and the values of its controls in the Registry in C#. The example Save and restore program settings in C# saves and restores a form’s … Continue reading

Posted in forms, programs, registry | Tagged , , , , , , , , , , , | 7 Comments