Help! ShutDown Windows95 using VB4 
Author Message
 Help! ShutDown Windows95 using VB4

I'm just learning VB and would like to know how to shutdown windows
from within a VB program. What I would really like to do is to write a
program to exit windows with one click.  Thanks .



Sat, 14 Nov 1998 03:00:00 GMT  
 Help! ShutDown Windows95 using VB4

Quote:

> I'm just learning VB and would like to know how to shutdown windows
> from within a VB program. What I would really like to do is to write a
> program to exit windows with one click.  Thanks .

this is how to do it in 3.0 - i assume it will work in 4.0 but
i'm wrong a lot.

in a code module (.bas) put the following in general declarations:
(remember, it all has to be on one line!)

Declare Function exitwindows Lib "user" (ByVal dwreserved As Long, ByVal
intreturncode As Integer) As Integer

then in the click sub for your command button, try the following:

Dim intexitok As Integer
intexitok = exitwindows(0, 0)

changing the value of the 0,0 will allow you to have windows restart
automatically, etc. but with 0,0 it don't do nothing but end.

Mike



Sun, 15 Nov 1998 03:00:00 GMT  
 Help! ShutDown Windows95 using VB4

In your Visual Basic directory, in the WINAPI subdirectory there is a file
called win32api.txt. Open it and search for "ExitWindows". U will find the
routine and flags declarations required.
--
Hope this helps,
Gadi
----------
Gadi Naveh
Software designer and engineer, Netro Corporation

----------
So long and thanks for all the fish (Douglas Adams, Hitchhiker's Guide)


Quote:
> I'm just learning VB and would like to know how to shutdown windows
> from within a VB program. What I would really like to do is to write a
> program to exit windows with one click.  Thanks .



Mon, 16 Nov 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. vb4-windows95 shutdown routine

2. Bugs on using multiple access database on VB4 on Windows95

3. Ctr+Alt+Del and Ctrl+Tab in windows95 using vb4(16bits)

4. windows95 shutdown/wait/restart?

5. Windows95 Shutdown

6. Intercepting Windows95 Shutdown

7. Unable to Shutdown Windows95 & reboot via WSH

8. Shutdown windows95 in VB?

9. Shutdown Windows95

10. How to Shutdown Windows95

11. Shutdown Windows95

12. Access97, VBA, Win32, API, Windows95: CreateEvent returns 0 with Windows95

 

 
Powered by phpBB® Forum Software