Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Systemeigenschaften öffnen (https://www.delphipraxis.net/21636-systemeigenschaften-oeffnen.html)

NikoMitDaMacht 5. Mai 2004 21:08


Systemeigenschaften öffnen
 
Wie kann ich mit ShellExecute die Systemeigenschaften öffnen (%root%\system32\sysdm.cpl)

NicoDE 5. Mai 2004 21:26

Re: Systemeigenschaften öffnen
 
Delphi-Quellcode:
  ShellExecute(Handle, nil, 'sysdm.cpl', nil, nil, SW_SHOwDEFAULT);
  // oder
  ShellExecute(Handle, 'cplopen', 'sysdm.cpl', nil, nil, SW_SHOwDEFAULT);
  // oder (bestimmte Seite)
  ShellExecute(Handle, 'cplopen', 'sysdm.cpl', 'sysdm.cpl,3', nil, SW_SHOwDEFAULT);
  // oder (bestimmter User)
  ShellExecute(Handle, 'runas', 'sysdm.cpl', 'sysdm.cpl,3', nil, SW_SHOwDEFAULT);
Abfrage des Rückgabewertes nicht vergessen :)

NikoMitDaMacht 10. Mai 2004 18:17

Re: Systemeigenschaften öffnen
 
Cool, danke!
Doch...
Zitat:

Abfrage des Rückgabewertes nicht vergessen
:wiejetzt:

NicoDE 10. Mai 2004 18:24

Re: Systemeigenschaften öffnen
 
Zitat:

Zitat von NikoMitDaMacht
:wiejetzt:

MSDN-Library durchsuchenShellExecute
Zitat:

Returns a value greater than 32 if successful, or an error value that is less than or equal to 32 otherwise. The following table lists the error values. The return value is cast as an HINSTANCE for backward compatibility with 16-bit Windows applications. It is not a true HINSTANCE, however. The only thing that can be done with the returned HINSTANCE is to cast it to an int and compare it with the value 32 or one of the error codes below.


Alle Zeitangaben in WEZ +1. Es ist jetzt 07:02 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz