Using Win32 functions in Visual FoxPro Image Gallery
Region
..msdn
CombineRgn
CreateEllipticRgn
CreateRectRgn
CreateRoundRectRgn
FrameRgn
GetRegionData
GetRgnBox
Code examples:
How to create transparent areas inside a form -- punching holes in the form
How to draw custom Window Caption on FoxPro form
Round FoxPro form
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: 124  
    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 (54.234.42.16)
    27.42 min.Function: 'CeRapiUninit'
    27.47 min.Function: 'NetServerGetInfo'
    Function group: 'Network Management'
    27.53 min.Example: 'Using IsChild() for testing ThisForm.ShowWindow property'
    4.16 hrs.Example: 'URL: splitting into its component parts'
     Function: 'GetFileSizeEx'
    4.38 hrs.Function: 'SetTextColor'
     Function: 'EnumDeviceDrivers'
    Function group: 'Performance Monitoring'
    5.62 hrs.Function: 'GetWindowInfo'
    Function group: 'Window'
     Example: 'Moving shortcut to a specified position on the Windows Desktop'
    6.07 hrs.Function: 'capGetDriverDescription'
    Function group: 'Windows Multimedia'
    Google
    Advertise here!