Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Controlling master audio volume by sending WM_APPCOMMAND messages
Adding printer to the list of supported printers for the specified server
Displaying hypertext links with the SysLink control (VFP9, Comctl32.dll)
How to print FoxPro form -- II
Passing data records between VFP applications via the Clipboard
Shortcut Menu Class
Terminating all running applications from a VFP program
Using FoxTray ActiveX control: System Tray Icon and menu attached to VFP form
CryptoAPI: Collection of Providers class
Customizing the frame of top-level form: removing the standard frame (VFP9, Vista)
GDI+: Creating thumbnails to preview images in a directory
How to copy the image of a form to the Clipboard using Bitmap API functions
How to print picture stored in enhanced-format metafile (*.emf)
Playing WAV files on InteractiveChange
Creating the Open dialog box to specify the drive, directory, and name of a file to open
Winsock: resolving an address to a host name
GDI+: creating a gradient
How to display a user-defined icon in the MessageBox dialog
Drawing icons associated with the VFP main window
Enumerating ODBC Data Sources available on the local computer
GDI+: copying to the Clipboard (a) image of active FoxPro window/form, (b) image file
Verifying a file using the Authenticode policy provider
Using EnumPrinters function to enumerate locally installed printers
Converting command-line string to a set of Unicode argument strings
Controlling master audio volume by sending WM_APPCOMMAND messages

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:

The WM_APPCOMMAND message allows to acquire medium level of control over several OS areas: speakers, microphone, media, browser, mail, default applications.

The code sample below shows how to mute, unmute and change the volume of the speakers. This technique provides no means of reading the volume level or the mute state.

See also:
  • WAV file player
  • WAV file recorder
  • Playing WAV sounds simultaneously
  • How to play MIDI notes

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

    User rating: 0/10 (0 votes)
    Rate this code sample:
    • ~
    2206 bytes  
    Created: 2013-11-09 11:19:17  
    Modified: 2013-11-09 11:45:32  
    Visits in 7 days: 106  
    Listed functions:
    Printer friendly API declarations
    My comment:
    The WM_APPCOMMAND message needs to be sent to either of three: _vfp.hWnd, _screen.hWnd, ThisForm.hWnd.

    Word Index links for this example:
    Translate this page:
      Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
    User Contributed Notes:
    There are no notes on this subject.

    Copyright 2001-2018 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.6.39), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
    Last Topics Visited (
    18 sec.Example: 'Enumerating global and local group accounts on a server (WinNT/XP/2K)'
    38 sec.Function: 'CreateMD5SSOHash'
    Function group: 'Internet Functions (WinInet)'
    53 sec.Example: 'How to hot-track menu item selection in top-level form (requires VFP9)'
    1.28 min.Function: 'SCardDisconnect'
    1.58 min.Example: 'Winsock: retrieving information about available transport protocols'
    1.9 min.Example: 'GDI+: sending image of FoxPro form to printer'
    2.2 min.Function: 'GdipNewInstalledFontCollection'
    Function group: 'GDI+ Font'
    2.83 min.
    Function group: 'URL Monikers'
    3.12 min.Example: 'Opening access to the Microsoft Internet functions for the application'
    3.48 min.Function: 'FindCloseChangeNotification'
    Function group: 'File Management'
    Advertise here!