Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to draw custom Window Caption on FoxPro form
Quering Audio Mixer Device
Simple printer queue monitor: deletes, pauses, resumes print jobs for local printer
Bitmap Class for Visual FoxPro application
How to display a user-defined icon in the MessageBox dialog
How to remove a directory that is not empty
Using Extended MessageBox() Class
How to assemble an array of strings and pass it to external function
Setting the mouse capture to the specified window
Starting an external application in VFP using WinExec
Subclassing CommandButton control to create BackColor property
Using the SystemParametersInfo function
How to retrieve the number of print jobs queued for the printer
Using the DrawText function
How to ping a remote site using IP Helper API calls
Winsock: connecting to a news server (NNTP, port 119)
Obtaining names of local and global groups for current user (WinNT/XP/2K)
Programmatically removing submenus from VFP main menu
Transparent Menu Class (requires VFP9)
Creating a mailslot
Enumerating print jobs and retrieving information for default printer (JOB_INFO_1 structures)
How to play MIDI notes
Drawing Windows predefined bitmaps using the LoadBitmap functions
Storing screen shot of a form to enhanced metafile (*.emf)
Using FlashWindowEx to flash the taskbar button of the VFP application

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
Versions:
click to open
Before you begin:
This code sample shows how to turn user to the monitor`s screen by flashing the icon of an application in the Windows taskbar. There are several other ways of alerting the user using various visual effects:

  • Flashing caption of a VFP application in the Windows task bar using FlashWindow
  • Shaking VFP form controls
  • Placing On-screen Alert on top of all windows
  •  
      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:
    • ~
    1263 bytes  
    Created: 2002-01-29 22:56:25  
    Modified: 2012-04-27 16:14:04  
    Visits in 7 days: 192  
    Listed functions:
    FlashWindowEx
    GetActiveWindow
    Printer friendly API declarations
    My comment:
    This is an asynchronous function, that means it returns immediately after beginning the flashing.

    Once the handle of a window is known, it is possible to flash the window with a caption and/or taskbar button.

    Another code sample shows how to enumerate handles for the child windows of the main VFP window. Apply the FlashWindowEx to any of these windows and watch the result.

    * * *
    The FlashWindowManager class shown here once added to C# WinForm project automatically adds FlashWindow and FlashStop extension methods to every form in the project.

    With fairly small changes the FlashWindowManager class can be used with .NET WPF forms.
    public static void FlashWindow(
            this Window window,
            FlashWinFlags flags = FlashWinFlags.FlashAll,
            int count = int.MaxValue,
            nt timeout = 0)
    {
            var windowInteropHelper = new WindowInteropHelper(window);
            FlashWindow(windowInteropHelper.Handle, flags, count, timeout);
    }
    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 (184.73.74.47)
    4 sec.Example: 'Running a regular FoxPro form while main VFP window is minimized'
    34.48 min.Example: 'How to display the port-configuration dialog box for a port on the specified server'
    1.85 hrs.Example: 'Drawing Windows predefined bitmaps using the LoadBitmap functions'
    1.86 hrs.
    9.08 hrs.Function: 'inet_ntoa'
    Function group: 'Windows Sockets 2 (Winsock)'
     Function: 'waveOutReset'
    Function group: 'Windows Multimedia'
    12.09 hrs.Function: 'GetPrivateProfileSectionNames'
    13.73 hrs.Example: 'Getting a bit more than the _CLIPTEXT offers'
     Function: 'InternalGetWindowText'
    17.74 hrs.Function: 'OpenWaitableTimer'
    Google
    Advertise here!