Using Win32 functions in Visual FoxPro Image Gallery
Function Groups:
All Functions 1306
Atom 1
Authentication 14
Authorization 6
Bitmap 9
Brush 2
Clipboard 20
Color 1
Common Dialog Box 12
Console 12
Coordinate Space and Transformation 9
Cryptography Reference 28
Cursor 5
Data Decompression Library 3
Debugging 2
Desktop Window Manager (DWM) 1
Device Context 13
Device Input and Output 1
Dialog Box 6
DNS Functions 1
Dynamic-Link Library 6
Error Handling 10
Event Logging 10
Extensible Storage Engine (ESE, Jet Blue) 23
File Management 49
File Mapping 4
File System 19
Filled Shape 2
Font and Text 13
GDI+ 6
GDI+ Bitmap 10
GDI+ Brush 4
GDI+ Font 9
GDI+ Graphics 28
GDI+ Image 20
GDI+ ImageAttributes 3
GDI+ Matrix 10
GDI+ PathGradient Brush 3
GDI+ Pen 2
GDI+ StringFormat 2
GDI+ Text 2
Handle and Object 4
Hook 2
HTTP Functions (WinHTTP) 12
Icon 7
Internet Functions (WinInet) 49
IP Helper 24
Kernel Transaction Manager 3
Keyboard Input 22
Mailslot 3
Memory Management 26
Menu 18
Message and Message Queue 12
Metafile 6
Monitor Configuration (Vista) 8
Mouse Input 8
MSHTML Reference 1
Multilingual User Interface 4
Multiple Display Monitors 2
National Language Support 20
Network Management 34
Painting and Drawing 17
Path 3
Performance Monitoring 12
Pipe 5
PnP Configuration Manager 6
Power Management 6
Printing and Print Spooler 35
Process and Thread 31
Raw Input 4
Region 7
Registry 21
Remote Access Service (RAS) 5
Remote Application Programming (RAPI) 49
Remote Procedure Call (RPC) 7
Resource 10
Security 22
Service 11
Setup API functions 7
Shell Functions 39
Shell Lightweight Utility APIs -- misc. functions 2
Shell Lightweight Utility APIs -- Path Functions 20
Shell Lightweight Utility APIs -- string functions 4
Simple MAPI 9
String 10
Synchronization 13
System Information 23
System Shutdown 5
Terminal Services 10
Time 16
Unicode and Character Set 2
URL Monikers 7
Version Information 2
Virtual Hard Disk (Win7) 4
Window 37
Window Class 8
Window Procedure 3
Window Property 3
Window Station and Desktop 7
Windows Controls 8
Windows Multimedia 76
Windows Networking 18
Windows Sockets 2 (Winsock) 38
Power Management            ..msdn    Add comment
GetPwrCapabilities The GetPwrCapabilities function retrieves information about the system power capabilities.
GetSystemPowerStatus Retrieves the power status of the system. The status indicates whether the system is running on AC or DC power, whether the battery is currently charging, and how much battery life remains.
IsPwrSuspendAllowed Determines whether the computer supports the sleep states.
SetSuspendState The SetSuspendState function suspends the system by shutting power down. Depending on the Hibernate parameter, the system either enters a suspend (sleep) state or hibernation (S4).
SetSystemPowerState The SetSystemPowerState function suspends the system by shutting power down. Depending on the ForceFlag parameter, the function either suspends operation immediately or requests permission from all applications and device drivers before doing so.
SetThreadExecutionState Enables applications to inform the system that it is in use, thereby preventing the system from entering the sleeping power state or turning off the display while the application is running.
Code examples:
How to suspend or hibernate your system
Get the power status of your laptop computer
Power capabilities of the system: battery, UPS, sleep and hibernation modes, processor throttling
User Contributed Notes:
Ricardo Pacheco | 2006-01-12 15:09:33
Not found all Power Management Functions
A.M. | 2006-01-12 16:17:29
Hi Ricardo,

There are several thousand API calls, from which I have about 1000 described on this web site. Of course there may be some functions missed :)

I may assure you, I'm working on it. My point, every function must have a usage sample.
Don Higgins | 2006-04-11 13:03:17
How then do you disable any power saving features including turning off hard disks, monitors, standby and hibernate?

I have a tough time with customers who let their systems do this and it shuts down my program.
A.M. | 2006-04-11 13:37:13
Most likely it can be done through modifying Power Schemes: functions Get/SetActivePwrScheme, WritePwrScheme.

I have not looked into those yet. Can make a good subject.

The Power Schemes are stored somewhere in the Registry and probably can be accessed directly.
Carlos Alloatti | 2006-04-15 12:45:28
Don, Check this:

Intercept power broadcast messages

Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
15 sec.
Function group: 'Terminal Services'
28 sec.Function: 'FtpFindFirstFile'
40 sec.Function: 'DrawText'
53 sec.Function: 'GetLocalTime'
1.07 min.Function: 'EndDoc'
1.23 min.Function: 'CreateEllipticRgn'
1.43 min.Function: 'GdipSetMatrixElements'
1.63 min.Function: 'GetMenuItemID'
1.87 min.Function: 'AVIFileExit'
2.07 min.
Function group: 'Device Context'
Advertise here!