Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to change display settings: screen resolution, screen refresh rate
Adding and deleting Scheduled Tasks using NetScheduleJob API functions
Custom GDI+ class
Converting Unicode data from the Clipboard to a character string using a given code page
Winsock: sending email messages (SMTP, port 25)
Capturing keyboard activity of another application with the Raw Input API (VFP9)
Enumerating data formats currently available on the clipboard
Custom FTP Class for Visual FoxPro application
Detecting changes in connections to removable drives (VFP9)
How to download a file from the FTP server using FtpGetFile
How to activate Windows Calculator
Splash Screen for the VFP application
Custom HttpRequest class (WinINet)
Enumerating raw input devices attached to the system (keyboard, mouse, human interface device)
Mapping and disconnecting network drives
Establishing connection using the SQLDriverConnect
Using Font and Text functions
Custom HttpRequest class (WinHTTP)
How to convert a bitmap file to monochrome format (1 bpp)
Displaying bitmap using the AlphaBlend function
Using EnumPrinters function to enumerate locally installed printers
Using WM_COPYDATA for interprocess communication (VFP9)
Vertical Label control
How to play AVI file on the _screen
Using MessageBeep

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:
See also:
  • Using Beep and Sleep
  • How to play MIDI notes
  •  
    using System;
    using System.Threading;
    using System.Runtime.InteropServices;
     
    namespace ConsoleApplication1
    {
        partial class Program
        {
            enum MessageBeepType
            {
                Ok = 0,
                OkCancel = 1,
                Hand = 0x10,
                Question = 0x20,
                Exclamation = 0x30,
                Asterick = 0x40,
                Mask = 0xf0,
            }
     
            static void MessageBeepAndSleep()
            {
                _messageBeep(MessageBeepType.Asterick);
                _messageBeep(MessageBeepType.Exclamation);
                _messageBeep(MessageBeepType.Hand);
                _messageBeep(MessageBeepType.Mask);
                _messageBeep(MessageBeepType.Ok);
                _messageBeep(MessageBeepType.OkCancel);
                _messageBeep(MessageBeepType.Question);
            }
     
            static void _messageBeep(MessageBeepType beepType)
            {
                MessageBeep(beepType);
                Thread.Sleep(1000);
            }
     
            //[DllImport("kernel32.dll")]
            //static extern bool Sleep(UInt32 dwMilliseconds);
     
            [DllImport("user32.dll")]
            static extern bool MessageBeep(MessageBeepType beepType);
        }
    }
     

    User rating: 0/10 (0 votes)
    Rate this code sample:
    • ~
    1187 bytes  
    Created: 2001-07-12 12:00:00  
    Modified: 2010-06-22 09:36:34  
    Visits in 7 days: 115  
    Listed functions:
    MessageBeep
    Printer friendly API declarations
    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 (107.22.127.92)
    6.05 hrs.Example: 'Obtaining heap handles and enumerating memory blocks for the current VFP session (WinNT only)'
     Example: 'Retrieving long values associated with the class of the VFP window'
    6.29 hrs.Function: 'SHSimpleIDListFromPath'
     Function: 'AddPrinter'
    Function group: 'Printing and Print Spooler'
    6.4 hrs.Example: 'Dragging files from Explorer window and dropping them on FoxPro control (requires VFP9)'
     Example: 'Attaching menu to a top-level form'
    12.9 hrs.Example: 'How to print a bitmap file'
     Example: 'How to ping a remote site using IP Helper API calls'
    13.38 hrs.Example: 'Custom GDI+ class'
    16.93 hrs.Example: 'Storing registration key in the resources of an executable file'
    Google
    Advertise here!