Using Win32 functions in Visual FoxPro Image Gallery
Shell Functions
..msdn
AssocQueryString
DllGetVersion
DragAcceptFiles
DragFinish
DragQueryFile
DragQueryPoint
FileIconInit
FindExecutable
GetFileNameFromBrowse
GetMenuContextHelpId
GetWindowContextHelpId
InetIsOffline
IsUserAnAdmin
LoadUserProfile
PathMakeUniqueName
PathYetAnotherMakeUniqueName
RealDriveType
RestartDialog
SHAddToRecentDocs
SHBrowseForFolder
SHCreateDirectory
ShellAbout
ShellExecute
ShellExecuteEx
Shell_GetImageLists
Shell_NotifyIcon
SHEmptyRecycleBin
SHFileOperation
SHFormatDrive
SHGetFileInfo
SHGetFolderPath
SHGetPathFromIDList
SHGetSpecialFolderLocation
SHGetStockIconInfo
SHParseDisplayName
SHQueryRecycleBin
SHSimpleIDListFromPath
UnloadUserProfile
WinHelp
Code examples:
Accessing Adobe Reader 7.0 main menu from VFP application
Accessing examples contained in this reference from a VFP application
Accessing examples contained in this reference through Web Services
Accessing Windows Control Panel from VFP Application
GDI+: converting text strings to images and saving in a graphics file
GDI+: creating a gradient
GDI+: creating scaled copy of image file
GDI+: cropping images
GDI+: Drawing a Pie Chart
How to access a file using not its name but an alias (hard link)
How to control Adobe Reader 9.0 (SDI mode) from VFP application
How to display Windows On-Screen Keyboard
Mapping and disconnecting network drives
Reading the structure of VFP main menu
Saving local machine ODBC Registry Entries to XML file
Storing content of the Clipboard to a bitmap file
Using Shell for performing operations on files
ShellExecute
    Add comment     W32 Constants      Translate this page
Performs an operation on a specified file.
Code examples:
Storing content of the Clipboard to a bitmap file
How to control Adobe Reader 9.0 (SDI mode) from VFP application
Reading the structure of VFP main menu
How to display Windows On-Screen Keyboard
GDI+: creating a gradient
Mapping and disconnecting network drives
Accessing Adobe Reader 7.0 main menu from VFP application
Saving local machine ODBC Registry Entries to XML file
Using Shell for performing operations on files
Accessing examples contained in this reference through Web Services
Declaration:
 
HINSTANCE ShellExecute(
    HWND hwnd, 
    LPCTSTR lpOperation,
    LPCTSTR lpFile, 
    LPCTSTR lpParameters, 
    LPCTSTR lpDirectory,
    INT nShowCmd
);
 
 
FoxPro declaration:
 
DECLARE INTEGER ShellExecute IN shell32; 
    INTEGER hwnd,; 
    STRING  lpOperation,; 
    STRING  lpFile,; 
    STRING  lpParameters,;  
    STRING  lpDirectory,; 
    INTEGER nShowCmd
 
Parameters:
hwnd
Handle to a parent window. This window receives any message boxes that an application produces, such as error reporting.

lpVerb
A string, referred to as a verb, that specifies the action to be performed: edit, explore, find, open, print

lpFile
Address of a null-terminated string that specifies the file or object on which to execute the specified verb.

lpParameters
If the lpFile parameter specifies an executable file, lpParameters is an address to a null-terminated string that specifies the parameters to be passed to the application.

lpDirectory
Address of a null-terminated string that specifies the default directory.

nShowCmd
Flags that specify how an application is to be displayed when it is opened.
Return value:
Returns a value greater than 32 if successful, or an error value that is less than or equal to 32 otherwise. . The return value is cast as an HINSTANCE for backward compatibility with 16-bit Microsoft® Windows® applications. It is not a true HINSTANCE, however.
Usage:
 
= ShellExecute(0, "print", "c:\aa\index.txt",;
    "", "", SW_SHOWMAXIMIZED)
 
My comment:
The following verbs are commonly used: edit, explore, find, open, print and properties.

See also: ShellExecuteEx, CreateProcess, AssocQueryString
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
•
Created: 2001-08-06 12:00:00
Modified: 2012-10-12 13:24:05
Visited in last 7 days: 168
User Contributed Notes:
Sarabjeet Singh Reen | 2005-06-03 10:48:58
How to know that the executable which we are running using shellexecute is closed. When we write any code after the shellexecute command it executes after opening the window.

How do we write the code which we want to run after the executable is finished running

Copyright © 2001-2017 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.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.224.164.166)
21 sec.Function: 'SetJob'
39 sec.Function: 'SearchPath'
1.32 min.Function: 'WinHttpSetCredentials'
1.65 min.Function: 'recv'
2.03 min.Function: 'UnlockFile'
3.42 min.Function: 'RegisterHotKey'
4.17 min.Function: 'UnregisterHotKey'
4.55 min.Function: 'SetupGetInfInformation'
4.95 min.Function: 'WinHttpCloseHandle'
8.12 min.Function: 'WinHttpAddRequestHeaders'
Google
Advertise here!