VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Restart or Shutdown your computer using APIs

Abdus Salam Naeem  (3 Submissions)   Windows API Call/Explanation   VB 6.0   Unknown Difficulty   Sat 26th January 2002   Mon 8th February 2021

Restart or Shutdown your computer using APIs

API Declarations


'Name the form as form1
'FROM TOOL BOX TAKE
'
'one command buttons array on ur form and named it command1
'index 1 for shutdown and index 2 for restart
'one command button for exit and named it command2
'one command button for ok and named it command3
'one timer control and named it timer1
'tow label control and named it label1 and label2
'one text box and named it text1
'In case of any problem u can trace me at
'[email protected]

'==========================================================

Option Explicit
Private tempTime As Variant
Private Const EWX_SHUTDOWN As Long = 1
Private Const EWX_RESTART As Long = 2
Private Declare Function ExitWindowsEx Lib "user32" (ByVal dwOptions As Long, ByVal dwReserved As Long) As Long


Rate Restart or Shutdown your computer using APIs (1(1 Vote))
Restart or Shutdown your computer using APIs.bas

Restart or Shutdown your computer using APIs Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters