Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to drag a Form not using its Titlebar or Caption
Saving available locale records into a cursor
Using an Event Object. Part A: running an application that creates an Event object
Using LoadLibrary
Retrieving information about all users currently logged on to the workstation (WinNT only)
Running a regular FoxPro form while main VFP window is minimized
Who owns the Windows Clipboard
Winsock: initializing the service in the VFP application
Building a tree of subdirectories for a given path using FindFile functions
Enumerating Processes -- Win9*
Obtaining MAC address through Address Resolution Protocol (ARP) request
Reading Internet Query options
Winsock: how to retrieve a service information corresponding to a service name
Hiding mouse cursor
Pocket PC: System Registry Viewer
Retrieving the IP-to-physical address mapping table
Memory usage info for current VFP session (WinNT only)
Retrieving graphic capabilities of default printer
How to play a waveform sound (a WAV file in particular)
Using the Semaphore object
Current System information
Retrieving geometrical parameters of the system desktop window
How to test file attributes (key method for FileExists and DirectoryExists routines)
Obtaining window class name for the main VFP window
Who owns the Windows Clipboard

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
 
DO declare
 
hWindow=GetActiveWindow()
hOwner=GetClipboardOwner()
 
? "Active window: ............", hWindow,;
    "["+GetWinText(hWindow)+"]"
 
? "_SCREEN.HWnd: .............", _screen.HWnd,;
    "["+GetWinText(_screen.HWnd)+"]"
 
? "Window owning clipboard: ..", hOwner,;
    "["+GetWinText(hOwner)+"]"
 
FUNCTION GetWinText(hWindow)
    LOCAL nBufsize, cBuffer
    nBufsize = 128
    cBuffer = Repli(Chr(0), nBufsize)
    nBufsize = GetWindowText(hWindow, @cBuffer, nBufsize)
RETURN Iif(nBufsize=0, "", Left(cBuffer, nBufsize))
 
PROCEDURE declare
    DECLARE INTEGER GetActiveWindow IN user32
    DECLARE INTEGER GetClipboardOwner IN user32
 
    DECLARE INTEGER GetWindowText IN user32;
        INTEGER hwnd, STRING @lpString, INTEGER cch
 
 
 

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
731 bytes  
Created: 2001-07-12 12:00:00  
Modified: 2005-04-07 19:51:53  
Visits in 7 days: 62  
Listed functions:
GetActiveWindow
GetClipboardOwner
GetWindowText
Printer friendly API declarations
Word Index links for this example:
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
User Contributed Notes:
There are no notes on this subject.


Copyright © 2001-2013 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.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (184.72.184.104)
3 sec.Function: 'CreateFile'
6.24 hrs.Function: 'gethostbyname'
11.02 hrs.Example: 'Vertical Label control'
 Function: 'SetBkColor'
11.61 hrs.Function: 'WNetOpenEnum'
12.67 hrs.Example: 'Retrieving information specific to the current Time Zone'
 Example: 'How to find when the application started'
 Links
Page 4
13.68 hrs.Example: 'How to make a VFP form fading out when released (GDI version)'
15 hrs.Function: 'SQLGetEnvAttr'
Function group: 'ODBC API'
Google
Advertise here!