vuShellDelay(pFile, DelayMS)
vuShellDelay(*CSTRING pFile, LONG DelayMS), LONG
Description
Launches a file using the Windows shell after waiting for a specified delay.
| Function |
Separate File/Params |
Working Folder |
Delay |
Wait |
Notes |
| vuShell |
No |
No |
No |
No |
Simple shell launch that honors Windows file associations. |
| vuShellDelay |
No |
No |
Yes |
No |
Shell launch after a startup delay. |
| vuShellEx |
Yes |
Yes |
No |
No |
Preferred shell launch when you want file and parameters passed separately. |
| vuShellExDelay |
Yes |
Yes |
Yes |
No |
Shell launch with separate parameters plus startup delay. |
Parameters
| Parameter |
Data Type |
Description |
| pFile |
CSTRING(260) |
Full path to the file or executable to launch. |
| DelayMS |
LONG |
Delay before launching, in milliseconds. |
Note: In vuFileTools V5, CSTRINGs are not limited to the size shown above. The number is for example only.
Returns
A LONG value indicating the result:
- 1 if the file launched successfully after the delay
- 0 if the launch failed
- Negative values may indicate a Windows shell error
Example
FilePath CSTRING(260)
DelayMS LONG
Ret LONG
FilePath = 'C:\Temp\Readme.txt'
DelayMS = 2000
Ret = vuShellDelay(FilePath, DelayMS)
Notes
- Use this when you need shell association behavior but want to defer the launch briefly.
- Use
vuShellExDelay when you also need separate parameters or a working folder.