public Hovedmeny() { InitializeComponent(); Console.SelectedIndexChanged += new EventHandler(tabControl1_SelectedIndexChanged); // sjekker om NAVinfo registry key finnes, lager om ikke var navinfofs = new functions(); if (navinfofs.KeyExists(HKCU, @"Software\NAVinfo")) { } else { HKCU.CreateSubKey(@"Software\NAVinfo"); }; // Setter versjonsinfo if (System.Deployment.Application.ApplicationDeployment.IsNetworkDeployed) { label21.Text = System.Deployment.Application.ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString(); } //label24.Text = Environment.OSVersion.ToString(); using (RegistryKey key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion")) { if (key != null) { Object o = key.GetValue("ReleaseId"); Object o2 = key.GetValue("CurrentBuildNumber"); label24.Text = o.ToString() + " (" + o2.ToString() + ")"; } } }