| Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free! |
want to shutdown my system in VB-6
|
Original Message
|
Name: sana
Date: July 31, 2002 at 23:32:10 Pacific
Subject: want to shutdown my system in VB-6 |
Comment: 1- I want to shutdown my system through the coding of VB-6, is it possible? Please reply. 2- I want to disable sound in my web page (www.pakstamps.8k.com) can i do?
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: Alintan
Date: August 1, 2002 at 00:39:47 Pacific
|
Reply: (edit)Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long Private Const EWX_LOGOFF = 0 Private Const EWX_SHUTDOWN = 1 Private Const EWX_REBOOT = 2 Private Const EWX_FORCE = 4 Dim rVal As Long Dim ShutDown As Integer Private Sub ShutPc_Click() rVal = ExitWindowsEx(1, 0&) 'Shutdown... End Sub Private Sub LogOffPc_Click() rVal = ExitWindowsEx(0, 0&) 'Shutdown... End Sub Private Sub RebootPc_Click() rVal = ExitWindowsEx(3, 0&) 'Shutdown... End Sub
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
Name: Annar
Date: August 1, 2002 at 00:46:06 Pacific
|
Reply: (edit)Answer to Q no1: U have to use a OS command calling it through the shell function in VB.
Report Offensive Follow Up For Removal
|

Post Locked
This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
Go to Programming Forum Home