February 20th, 2003, 10:36 AM
I had a chance to test this with Win2K Pro. You're right...it doesn't shutdown.
Turns out that VB apps don't have the correct privilege to shut down the system. See MS KB article 176695.
...
February 19th, 2003, 07:47 AM
Want to try this? It uses the ExitWindowsEx API call, so it should work with any version of Windows.
I'd try it with Windows 2000, but my SQL server users would be annoyed <grin>!
February 18th, 2003, 11:44 AM
You can find the path to the user's desktop by reading the 'Desktop' registry setting from
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
(Assuming...
February 17th, 2003, 08:43 AM
The printer.devicename gives you the same as ActivePrinter does in VBA. I guess this is OK for locally-attached printers but for network ones it gives you somethine like
\\server\printer on NE01:...
February 17th, 2003, 06:51 AM
Hi,
I'm looking for some sample code (VBA97 or VB6) for reading the model (driver?) name of a printer (the default printer would be fine).
The ActivePrinter property gives me <printer path> on...