Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Otros temas > Trucos
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Los mejores trucos

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 16-10-2006
JF Sebastian JF Sebastian is offline
Miembro
 
Registrado: oct 2006
Posts: 108
Poder: 18
JF Sebastian Va por buen camino
Registrar extensiones de ficheros en Delphi

Un pequeño truco para registrar desde Delphi las extensiones de archivos en el Registro de Windows.
Me he decidido a postearlo pues habia buscado con anterioridad aqui y no lo habia encontrado hasta que di con la solucion. Espero que sea de ayuda.
Un Saludo.
Código Delphi [-]
procedure RegisterFileType(ExtName:String; AppName:String; DefaultIcon:string);
var
  reg:TRegistry;
begin
  reg := TRegistry.Create;
  try
    reg.RootKey:=HKEY_CLASSES_ROOT;
    reg.OpenKey('.' + ExtName, True) ;
    reg.WriteString('', ExtName + 'file') ;
    reg.CloseKey;
    reg.CreateKey(ExtName + 'file') ;
    reg.OpenKey(ExtName + 'file\DefaultIcon', True) ;
    reg.WriteString('', AppName + ','+DefaultIcon) ;
    reg.CloseKey;
    reg.OpenKey(ExtName + 'file\shell\open\command', True) ;
    reg.WriteString('',AppName+' "%1"') ;
    reg.CloseKey;
  finally
    reg.Free;
  end;

  SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, nil, nil) ;
end;
Responder Con Cita
  #2  
Antiguo 25-10-2006
Avatar de German
German German is offline
Miembro
 
Registrado: may 2003
Ubicación: Barcelona - España
Posts: 133
Poder: 21
German Va por buen camino
http://clubdelphi.com/foros/showthread.php?t=30627

:)
Responder Con Cita
  #3  
Antiguo 25-10-2006
JF Sebastian JF Sebastian is offline
Miembro
 
Registrado: oct 2006
Posts: 108
Poder: 18
JF Sebastian Va por buen camino
Oñe, perdon, ni me di cuenta que habia ya algo dicho sobre el tema
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 21:59:19.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi