Call to Windows Display Dialog

I want to call the Windows Display Dialog from my Delphi Application how can I do that ?

Thanx

Martins

Martins_Asked:
Who is Participating?
 
peymanzConnect With a Mentor Commented:
Just a comment.
You should not use WinExec. WinExec is provided only for backwards compatibility with 16 bit versions of windows. 32 bit versions of windows should call CreateProcess or the ShellExecute functions:

uses shellapi;

ShellExecute(form1.Handle,'open', 'rundll32', 'shell32.dll, Control_RunDLL desk.cpl, , 0', nil, SW_SHOW);

you can also change the first parameter to 0 if you want desktop to be the owner of the dialog.

regards
// peymanz
0
 
CesarioCommented:
Hi,

I think you have a call a Function from rundll32..
I hope I found some stuff in Knowledge base

Best Regards

Cesario
0
 
CesarioCommented:
Hi Martins,

try it with this Code:

WinExec('rundll32 shell32.dll, Control_RunDLL desk.cpl, , 0', SW_SHOW);

0
 
djadjaCommented:
peymanz...
"just another comment" <G>
SW_SHOWNORMAL should be used when displaying a window for the first time (as per stated in the help)! :)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.