Using Win32 functions in Visual FoxPro Image Gallery
Painting and Drawing
..msdn
DrawAnimatedRects
DrawCaption
DrawEdge
DrawFrameControl
GdiFlush
GdiGetBatchLimit
GdiSetBatchLimit
GetBkMode
GetBoundsRect
GetWindowDC
GetWindowRgnBox
LockWindowUpdate
PaintDesktop
SetBkColor
SetBkMode
SetWindowRgn
WindowFromDC
Code examples:
An alternative way of setting Form.Closable to False
Creating a clipping region from the path selected into the device context of a form
Creating irregularly shaped FoxPro form using transparency color key
How to create transparent areas inside a form -- punching holes in the form
How to draw custom Window Caption on FoxPro form
How to make a VFP form fading out when released (GDI version)
How to make a VFP form fading out when released (GDI+ version)
Placing On-screen Alert on top of all windows
Round FoxPro form
Setting the Window Region for a 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: 134  
    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 (107.21.156.140)
    6.08 min.Example: 'Using vendor-neutral SQL constructs'
    6.15 min.Example: 'Bitmap Class for Visual FoxPro application'
    2.34 hrs.Example: 'How to display the Properties dialog box for a file (ShellExecuteEx)'
     Function: 'GetClipboardOwner'
    Function group: 'Clipboard'
    4.8 hrs.Example: 'Building a tree of subdirectories for a given path using FindFile functions'
     Function: 'RegEnumKey'
    Function group: 'Registry'
    5.55 hrs.Function: 'WTSQuerySessionInformation'
    Function group: 'Terminal Services'
     Function: 'PathSearchAndQualify'
    Function group: 'Shell Lightweight Utility APIs -- Path Functions'
    5.86 hrs.Function: 'WinHttpQueryHeaders'
    Function group: 'HTTP Functions (WinHTTP)'
     Example: 'Reading the state of mouse buttons within DO WHILE loop'
    Google
    Advertise here!