Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #17  
Antiguo 30-05-2016
xangiesaurx xangiesaurx is offline
Miembro
NULL
 
Registrado: feb 2016
Posts: 57
Poder: 9
xangiesaurx Va por buen camino
Hola, vengo a dejarles la solución que aplique para este problema, por si a alguien más en un futuro le sirve.

Básicamente, lo que hace este código es buscar en donde se encuentran los temas/skins el registro del último skin aplicado a la aplicación, lo jala y lo aplica.

Código Delphi [-]
  StyleServices.OnThemeChange:=OnThemeChange;

  SearchDir := 'Direccion del folder' + PathDelim;
  if DirectoryExists(SearchDir) then begin
    if FindFirst(SearchDir+'*.*',
                faAnyFile - faDirectory,
                searchResults) = 0 then
   repeat
     try
       if TStyleManager.IsValidStyle(
            SearchDir+searchResults.Name) then
          TStyleManager.LoadFromFile(
             SearchDir+searchResults.Name);
     except
       OutputDebugString('Not valid style file');
     end;
   until FindNext(searchResults) <> 0;
  end else
    OutputDebugString('Theme`s folder does not exist');
 // Sort the styles using a StringList
 SLStyles := TStringList.Create;
 try
   SLStyles.Duplicates := TDuplicates.dupIgnore;
   for Style in TStyleManager.StyleNames do
     SLStyles.Add(Style);
   SLStyles.Sort;

   R:=TRegistry.Create;
   try
     if R.OpenKey(PrgKey,false) then
     begin
       try
         S:=R.ReadString('ThemeStyle');
         TStyleManager.TrySetStyle(S,false);
       except
       end;
     end;
   finally
      FreeAndNil(R);
   end;

 finally
   SLStyles.Free;
 end;
Responder Con Cita
 



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

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Cambiando un string Soa Pelaez Varios 2 27-03-2016 03:14:20
cambiando de DBX a MDO Gabriel Conexión con bases de datos 4 09-08-2008 11:49:17
Cambiando a C# y .NET waltergomez La Taberna 10 01-08-2006 02:57:18
Cambiando Servidor a través de un Tcrpe... dunia_lv Impresión 0 28-04-2005 18:17:16


La franja horaria es GMT +2. Ahora son las 04:28:37.


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