Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Pocket PC: custom RAPI class for operating with files and folders on mobile device
Printing text with the Escape function
Quering Audio Mixer Device
Deleting files into the Recycle Bin
Running MSDOS Shell as a child process with redirected input and output (smarter RUN command)
How to download this reference`s archive through WinInet functions using InternetOpenUrl
How to make application automatically close all documents it opened
HOWTO: Use the Win32 API to Access File Dates and Times
Placing a button on the VFP form as a new child window
Testing an ODBC connection for supporting specific functionality
Browsing Windows Known Folders (Special Folders)
Changing pitch and speed of a wave file
Retrieving local computer and user names
Retrieving the name of the default printer for the current user on the local computer (Win NT/XP)
How to delete all print jobs for a printer
How to view icons stored in executable files (Icon Viewer) - II
Quering a waveform-audio input device
Reading list of folders and files on FTP server
The original LoadPicture() function in VFP returns valid handles to bitmaps, icons, cursors, and metafiles
Writing to INI file
Creating a window using CreateWindowEx function
Extended MessageBox Class
How to adjust monitor brightness (Vista, monitor with DDC support)
Winsock: retrieving Web pages using sockets (HTTP, port 80)
How to create transparent areas inside a form -- punching holes in the form

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
Before you begin:
Holes in a form
A region is a rectangle, polygon, or ellipse or a combination of two or more of these shapes. The SetWindowRgn function sets the window region of a window.

The window region determines the area within the window where the system permits drawing. In other words, parts of the form beyond the region are not visible. Any mouse clicks on invisible parts pass through them to the windows beneath.

See also:
  • How to draw a custom Window Caption on FoxPro form
  • Round FoxPro form
  • An alternative way of setting Form.Closable to False
  • Semi-transparent form
  • Transparent Menu on top-level form (requires VFP9)

  •  
      Members area. Log in to view this example.
     
      User name:
      Password:
     
     
      Forgot your password?
     
      Sign up for
    the Membership
     
     


    User rating: 0/10 (0 votes)
    Rate this code sample:
    • ~
    3402 bytes  
    Created: 2001-08-27 12:00:00  
    Modified: 2011-05-07 15:40:39  
    Visits in 7 days: 122  
    Listed functions:
    CombineRgn
    CreateEllipticRgn
    CreateRectRgn
    DeleteObject
    GetFocus
    GetWindowRect
    SetWindowRgn
    Printer friendly API declarations
    My comment:
    Visual FoxPro 8.0 Samples: Creating Irregularly Shaped Windows Sample.

    The SetLayeredWindowAttributes function can be used for creating transparent areas on forms, and even for making a whole form partially or totally transparent. A layered window is created by specifying WS_EX_LAYERED when creating the window with the CreateWindowEx function or by setting WS_EX_LAYERED via SetWindowLong after the window has been created.

    Only top-level windows (ShowWindow=2) can be made layered windows, whereas through using GDI regions even a child window can be "punched out".

    Read Window Features article on MSDN.
    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:
    wjarnold@prodigy.net | 2001-10-01 09:33:30
    Basically, the demo brings up a form with a left to right series of "holes" (white, round circles, each an inch or so in diameter) with the circles showing whatever is behind them (that is, through the "holes" they form)

    It gets cooler when you move the demo form around and realize that the holes are showing stuff on your screen that"s behind the form (took a minute to figure that out because I first ran it on an empty screen background <s>).

    One of the more imaginative things I"ve come across in form design in a while.

    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 (50.19.155.235)
    4 sec.Function: 'GetClassInfo'
    29.55 min.Example: 'How to find the application associated with a file name'
    29.6 min.Example: 'Using Change Notification Objects to monitor changes to the printer or print server'
    10.57 hrs.Example: 'Creating irregularly shaped FoxPro form using transparency color key'
    11.43 hrs.Example: 'Printing text with the Escape function'
    14.28 hrs.Example: 'Form Magnifier'
    15.13 hrs.Function: 'GetNumberOfEventLogRecords'
    Function group: 'Event Logging'
    16.19 hrs.Example: 'Attaching menu to a top-level form'
     Example: 'Enumerating ports that are available for printing on a specified server'
    17.25 hrs.Example: 'Obtaining physical parameters for a drive: sectors, clusters, cylinders...'
    Google
    Advertise here!