was ist neu ¦  programmier tips ¦  indy artikel ¦  intraweb artikel ¦  informationen ¦  links ¦  interviews
 sonstiges ¦  tutorials ¦  Add&Win Gewinnspiel

Tips (1541)

Dateien (137)
Datenbanken (90)
Drucken (35)
Grafik (114)
IDE (21)
Indy (5)
Internet / LAN (130)
IntraWeb (0)
Mathematik (76)
Multimedia (45)
Oberfläche (107)
Objekte/
ActiveX (51)

OpenTools API (3)
Sonstiges (126)
Strings (83)
System (266)
VCL (242)

Tips sortiert nach
Komponente


Tip suchen

Tip hinzufügen

Add&Win Gewinnspiel

Werbung

49 Visitors Online


 
...das Startkommando für einen installierten Mail-Client ermitteln?
Autor: Marc Dürst
Homepage: http://www.idev.ch
[ Tip ausdrucken ]  

Tip Bewertung (1):  
     


{
  Kommando ermitteln, mit welchem ein bestimmter,
  installierter Mail-Client gestartet werden kann.

  Get command to start a specific, installed Mail-Client.
}

uses
  
Registry;

function GetMailClientOpenCommand(AMailClient: string): string;
const
  
RegClientsRoot = '\SOFTWARE\Clients';
  RegClientsMail = '\Mail';
  RegClientsOpenCmd = '\shell\open\command';
var
  
reg: TRegistry;
begin
  
Result := '';
  reg := TRegistry.Create;
  try
    with 
reg do
    begin
      
CloseKey;
      RootKey := HKEY_LOCAL_MACHINE;
      if OpenKeyReadOnly(RegClientsroot + RegClientsMail +
        '\' + AMailClient +
        RegClientsOpenCmd) then
        
Result := reg.ReadString('');
    end;
  finally
    if 
Assigned(reg) then reg.Free;
  end;
end;

 

Bewerten Sie diesen Tipp:

dürftig
ausgezeichnet


Copyright © by SwissDelphiCenter.ch
All trademarks are the sole property of their respective owners