Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to change display settings: screen resolution, screen refresh rate
Enumerating data formats currently available on the clipboard
Custom GDI+ class
Winsock: sending email messages (SMTP, port 25)
Mapping and disconnecting network drives
Capturing keyboard activity of another application with the Raw Input API (VFP9)
Winsock: retrieving directory listing from an FTP server using passive data connection (FTP, port 21)
Converting Unicode data from the Clipboard to a character string using a given code page
Enumerating raw input devices attached to the system (keyboard, mouse, human interface device)
How to display the Properties dialog box for a file (ShellExecuteEx)
Disk in drive A:
Enumerating network resources
Detecting changes in connections to removable drives (VFP9)
How to download a file from the FTP server using FtpGetFile
Splash Screen for the VFP application
How to play AVI file on the _screen
Using EnumPrinters function to enumerate locally installed printers
Retrieving the name of the network resource associated with a local device
Using Video Capture: displaying on FoxPro form frames and previewing video obtained from a digital camera
Running MSDOS Shell as a child process with redirected input and output (smarter RUN command)
Using Font and Text functions
Creating a console window for Visual FoxPro application
Creating irregularly shaped FoxPro form using transparency color key
How to put a horizontal text scrolling on the form (a news line)
Saying "Hello World!" with VFP and WinAPI

User rating: 8/10 (1 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:
A hello world program is a frequently used programming example, usually designed to show the easiest possible application on a system that can actually do something (i.e. print a line that says "Hello World").


This message is great to start a day with!

 
#DEFINE STD_OUTPUT_HANDLE -11
 
DECLARE INTEGER AllocConsole IN kernel32
DECLARE INTEGER GetConsoleWindow IN kernel32
DECLARE INTEGER GetStdHandle IN kernel32 LONG nStdHandle
 
DECLARE INTEGER ShowWindow IN user32 AS ShowWindowA;
    INTEGER hWindow, INTEGER nCmdShow
 
DECLARE INTEGER WriteConsole IN kernel32;
    INTEGER hConsoleOutput, STRING @lpBuffer,;
    INTEGER nCharsToWrite, INTEGER lpCharsWritten,;
    INTEGER lpReserved
 
= AllocConsole()
= ShowWindowA(GetConsoleWindow(), 1)
= WriteConsole(GetStdHandle(STD_OUTPUT_HANDLE), "Hello World!", 12,0,0)
 
 
 

User rating: 8/10 (1 votes)
Rate this code sample:
  • ~
565 bytes  
Created: 2001-08-24 12:00:00  
Modified: 2006-05-19 09:20:21  
Visits in 7 days: 62  
Listed functions:
AllocConsole
GetConsoleWindow
GetStdHandle
ShowWindow
WriteConsole
Printer friendly API declarations
My comment:
   The original hello-world program in the Windows 1.0 SDK was a bit of a scandal. HELLO.C was about 150 lines long, and the HELLO.RC resource script had another 20 or so more lines. (...) Veteran C programmers often curled up in horror or laughter when encountering the Windows hello-world program.

— Charles Petzold, Programming Microsoft Windows with C#

* * *
What could be easier of that?
? "Hello World!"

or this
DEFINE WINDOW helloworld FROM 10,10 TO 20,50 SYSTEM CLOSE
ACTIVATE WINDOW helloworld
? "Hello World!"

* * *
Find more than 20 different ways of saying Hello World on FoxPro Wiki.
Read about Hello World program in Wikipedia.
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 (23.22.252.150)
4 sec.Example: 'How to create a desktop shortcut (shell link)'
8 sec.Function: 'GetRegionData'
1.5 hrs.Example: 'Retrieving the System Time adjustment'
 Function: 'NetShareDel'
2.12 hrs.Example: 'Initiating Inet connection using a modem'
2.13 hrs.Function: 'waveInReset'
4.55 hrs.Example: 'Pocket PC: custom RAPI class for operating with the Object Store Databases'
6.65 hrs.Function: 'GlobalAlloc'
Function group: 'Memory Management'
8.88 hrs.Example: 'Obtaining list of tables stored in an ODBC Data Source'
 Example: 'Storing screen shot of a form to enhanced metafile (*.emf)'
Google
Advertise here!