02/07/2019, 13:58
public partial class Form1 : Form
{
//Camera Object
CeleraCamera myCam;
public Form1()
{
InitializeComponent();
//Create new object
myCam = new CeleraCamera();
}
String RegistryKey;
public string Read(string keyName)
{
string subKey = "SOFTWARE\\" + Application.ProductName.ToUpper();
RegistryKey sk = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(subKey);
if (sk == null)
return null;
else
return sk.GetValue(keyName.ToUpper()).ToString();
}
/// <summary>
/// This C# code writes a key to the windows registry.
/// </summary>
/// <param name="keyName">
/// <param name="value">
public void Write(string keyName, string value)
{
string subKey = "SOFTWARE\\" + Application.ProductName.ToUpper();
RegistryKey sk1 = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(subKey);
sk1.SetValue(keyName.ToUpper(), value);
}
}
03/07/2019, 08:22
Skuola.net News è una testata giornalistica iscritta al Registro degli Operatori della Comunicazione.
Registrazione: n° 20792 del 23/12/2010.
©2000—
Skuola Network s.r.l. Tutti i diritti riservati. — P.I. 10404470014.
Powered by phpBB © phpBB Group - Privacy policy - Cookie privacy
phpBB Mobile / SEO by Artodia.