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
Custom GDI+ class
Converting Unicode data from the Clipboard to a character string using a given code page
Capturing keyboard activity of another application with the Raw Input API (VFP9)
Enumerating data formats currently available on the clipboard
Winsock: sending email messages (SMTP, port 25)
Custom FTP Class for Visual FoxPro application
How to download a file from the FTP server using FtpGetFile
Detecting changes in connections to removable drives (VFP9)
Splash Screen for the VFP application
Custom HttpRequest class (WinINet)
Mapping and disconnecting network drives
How to activate Windows Calculator
Enumerating raw input devices attached to the system (keyboard, mouse, human interface device)
How to convert a bitmap file to monochrome format (1 bpp)
Custom HttpRequest class (WinHTTP)
Establishing connection using the SQLDriverConnect
GDI+: copying to the Clipboard (a) image of active FoxPro window/form, (b) image file
Using EnumPrinters function to enumerate locally installed printers
Using Font and Text functions
Using WM_COPYDATA for interprocess communication (VFP9)
Displaying bitmap using the AlphaBlend function
Extensible Storage Engine class library
Who is the first in viewing the 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=GetClipboardViewer()
 
? "Active window: ............", hWindow,;
    "["+GetWinText(hWindow)+"]"
 
? "_SCREEN.HWnd: .............", _screen.HWnd,;
    "["+GetWinText(_screen.HWnd)+"]"
 
? "Window viewing 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 GetClipboardViewer IN user32
 
    DECLARE INTEGER GetWindowText IN user32;
        INTEGER hwnd, STRING @lpString, INTEGER cch
 
 
 

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
734 bytes  
Created: 2001-07-12 12:00:00  
Modified: 2005-04-07 19:54:20  
Visits in 7 days: 44  
Listed functions:
GetActiveWindow
GetClipboardViewer
GetWindowText
Printer friendly API declarations
My comment:
As you can see from this example the VFP Main Window is the first application viewing the clipboard - same for GetClipboardOwner
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 (54.242.188.217)
1.66 hrs.Function: 'GdipCreateFromHWND'
3.97 hrs.Function: 'BroadcastSystemMessage'
 Example: 'Converting long file names to the short format and vice versa'
6.64 hrs.Example: 'How to retrieve information about a cache entry (Internet Explorer)'
 Function: 'MonitorFromWindow'
11.49 hrs.Example: 'Playing WAV sounds simultaneously'
13.8 hrs.Example: 'GDI+: how to make VFP controls visually shake and shudder'
 Example: 'How to get Special Folders paths'
15.18 hrs.Example: 'Using an Event Object. Part B: running an application responding to events'
 Function: 'UuidCreate'
Google
Advertise here!