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
Capturing keyboard activity of another application with the Raw Input API (VFP9)
Converting Unicode data from the Clipboard to a character string using a given code page
Establishing connection using the SQLDriverConnect
Splash Screen for the VFP application
Winsock: sending email messages (SMTP, port 25)
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 create non-blocking Winsock server
GDI+: copying to the Clipboard (a) image of active FoxPro window/form, (b) image file
How to print a bitmap file
Bitmap Class for Visual FoxPro application
Enumerating raw input devices attached to the system (keyboard, mouse, human interface device)
Custom HttpRequest class (WinINet)
Custom HttpRequest class (WinHTTP)
Sending email messages with Simple MAPI
How to activate Windows Calculator
Peer-to-peer LAN messenger built with Mailslot API functions
Displaying bitmap using the AlphaBlend function
How to create MD-5 and SHA-1 hash values from a string
How to put a vertical text scrolling on the form (a movie cast)
Finding the path to the VFP executable running

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
 
DECLARE INTEGER GetModuleHandle IN kernel32;
    INTEGER lpModuleName
 
DECLARE INTEGER GetModuleFileName IN kernel32;
    INTEGER  hModule,;
    STRING @ lpFilename,;
    INTEGER  nSize
 
hModule = GetModuleHandle(0)
lpFilename = SPACE(250)
 
lnLen = GetModuleFileName (hModule, @lpFilename, Len(lpFilename))
? Left (lpFilename, lnLen)
 
 

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
335 bytes  
Created: 2001-08-03 12:00:00  
Modified: 2011-02-16 07:03:31  
Visits in 7 days: 118  
Listed functions:
GetModuleFileName
GetModuleHandle
Printer friendly API declarations
My comment:
Depending on OS, VFP version running, and differently for run-time and command window mode you may get various results:

c:\vfp\vfp.exe
c:\winnt\system32\vfp300.esl
c:\Program Files\Microsoft Visual Studio\VFP98\VFP6.Exe
...

* * *
? _vfp.servername



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 (50.19.155.235)
1.72 hrs.Example: 'How to control Adobe Reader 9.0 (SDI mode) from VFP application'
3.06 hrs.Example: 'Minimizing all running applications'
 Function: 'EnumPrinterDrivers'
Function group: 'Printing and Print Spooler'
5.27 hrs.Example: 'Displaying standard progress dialog box when copying files'
 Example: 'Reading entries from Event logs'
6.92 hrs.Example: 'How to hide your program from the Close Program dialog (Win9* only)'
12.26 hrs.Example: 'Establishing connection using the SQLDriverConnect'
17.1 hrs.Function: 'SetSysColors'
17.97 hrs.Example: 'How to create transparent areas inside a form -- punching holes in the form'
 Function: 'GetClassInfo'
Google
Advertise here!