Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

How did Windows start?
[ All Languages » VB »  Windows]

Total Hit ( 3066)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


If you need to know how Windows was started you have just to call an API function: GetSystemMetrics. Passing the SM_CLEANBOOT constant as parameter, the function returns a Long value with this meaning:

Click here to copy the following block
0 = Normal boot
1 = Fail-safe boot
2 = Fail-safe with network boot

Here ia an example that shows how to call the function:

Click here to copy the following block
Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) _
  As Long
Public Const SM_CLEANBOOT = 67

Private Sub Command1_Click()
  Select Case GetSystemMetrics(SM_CLEANBOOT)
    Case 0: MsgBox "Normal boot"
    Case 1: MsgBox "Fail-safe boot"
    Case 2: MsgBox "Fail-safe with network boot"
  End Select
End Sub


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.