Microsoft
Software
Hardware
Network
Question : Shell Api problem
Hi experts
I am using Borland Delphi 2006 for .net.
I am working in a windows forms application. I have just started using delphi and it's extremely frustrating. Even basic tutorials do not seem to work.
This one throws the following error message.
[Pascal Error] WinForm.pas(96): E2250 There is no overloaded version of 'ShellExecute' that can be called with these arguments
This is the line of code causing the problem ...
begin
ShellExecute(Handle, 'open', 'C:\WINDOWS\system32\notep
ad.exe', nil, nil, SW_SHOWNORMAL) ;
end;
I have included the ShellApi in the uses section of the unit.
As you can see I am trying to open notepad from a button on my form, but ...nothing.
Thanks for any help u can offer.
chris
Answer : Shell Api problem
Chris, add System.Diagnostics to the uses section:
uses
System.Diagnostics;
then you can use this line:
System.Diagnostics.Process
.Start( 'notepad.exe' );
Random Solutions
Is there a way to make “ShellExecuteEx()” work from a Windows Service application?
SATA Hard Drive Does Not Recognize
Using Modal Popup Extender with Master Page
problem with my .htaccess file
Primary hard drive not showing in computer management in Windows &
SSIS - Execute Process Task (from log text file to SQL server)
Asian characters appear in mass email
In .net C# how do you read a INI file
Adding additional server ito SBS2003 system - cannot see shared files on additional server
Create New Tab with dynamic data