Find Code:
All Words
Any of the Words
Exact Phrase
Home
:
Code
:
Forums
:
Submit
:
Mailing List
:
About
:
Contact
Code
All
VB.NET
ASP.NET
C#
VB Classic
ASP Classic
Snippets
Popular
Resources
Submit Code
Forums
Articles
Tips
Links
Books
Contest
Link to us
.NET Framework - Check if Windows booted in Normal
Author:
Gehan Fernando
E-mail:
Click to e-mail author
Submitted:
4/18/2011
Version:
C#
Compatibility:
C#
Category:
Forms
Views:
6127
.NET Framework - Check if Windows booted in Normal or Safe Mode.
Declarations:
using System; using System.Windows.Forms;
Code:
namespace TestApp { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { String msg; switch (SystemInformation.BootMode) { case BootMode.FailSafe: msg = "The computer was booted using only the basic files and drivers." + Environment.NewLine + "This is the same as Safe Mode."; break; case BootMode.FailSafeWithNetwork: msg = "The computer was booted using the basic files, drivers, and services necessary to start networking" + Environment.NewLine + "This is the same as Safe Mode with Networking."; break; default: msg = "The computer was booted in Normal mode."; break; } MessageBox.Show(msg, "Windows Mode", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }
Home
|
Forums
|
Submit
|
Books
|
Mailing List
|
Advertising
|
About
|
Contact
© 2024 A1VBCode. All rights reserved.
Legal disclaimer & terms of use
Privacy statement