Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to change display settings: screen resolution, screen refresh rate
Adding and deleting Scheduled Tasks using NetScheduleJob API functions
Capturing keyboard activity of another application with the Raw Input API (VFP9)
Custom GDI+ class
Converting Unicode data from the Clipboard to a character string using a given code page
Custom FTP Class for Visual FoxPro application
Custom HttpRequest class (WinINet)
Displaying animated images on FoxPro form with BitBlt and StretchBlt functions
Splash Screen for the VFP application
Establishing connection using the SQLDriverConnect
How to put a vertical text scrolling on the form (a movie cast)
Displaying bitmap using the AlphaBlend function
How to make a VFP form fading out when released (GDI+ version)
How to make a VFP form fading out when released (GDI version)
Using FlashWindowEx to flash the taskbar button of the VFP application
Winsock: sending email messages (SMTP, port 25)
How to create non-blocking Winsock server
Creating a mailslot
Peer-to-peer LAN messenger built with Mailslot API functions
Using WM_COPYDATA for interprocess communication (VFP9)
How to print a bitmap file
Sending a standard message with one or more attached files using default email client
Class for sound recording
GDI+: copying to the Clipboard (a) image of active FoxPro window/form, (b) image file
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: 79  
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 (23.20.196.179)
43.83 min.
43.9 min.Function: 'GetVersionEx'
4.85 hrs.Function: 'GetDlgItem'
 Function: 'LocalSize'
8.33 hrs.Example: 'GDI+: copying to the Clipboard (a) image of active FoxPro window/form, (b) image file'
12.05 hrs.Function: 'DeleteObject'
Google
Advertise here!