Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

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

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #2  
Antiguo 18-06-2003
Avatar de Investment
Investment Investment is offline
Miembro
 
Registrado: may 2003
Posts: 378
Poder: 24
Investment Va por buen camino
TRUCO 203 del TRUCOMANIA:

-Añade ShlObj, ActiveX y ComObj en el uses de tu form
Y usa esta función para crear el acceso directo.

Por ejemplo, crear un acceso directo en el escritorio al Block de Notas que abra el Autoexec.bat:
Código:
 
procedure TForm1.Button1Click(Sender: TObject);
 
  procedure CreaLnk( Exe,
                     Argumentos,
                     DirTrabajo,
                     NombreLnk,
                     DirDestino:string);
  var 
    Objeto: IUnknown;
    UnSlink: IShellLink;
    FicheroP: IPersistFile;
    WFichero: WideString;
  begin 
    Objeto := CreateComObject(CLSID_ShellLink);
    UnSlink := Objeto as IShellLink;
    FicheroP := Objeto as IPersistFile;
    with UnSlink do 
      begin 
        SetArguments( PChar(Argumentos) );
        SetPath( PChar(Exe) );
        SetWorkingDirectory( PChar(DirTrabajo) );
      end; 
    WFichero := DirDestino + '\' + NombreLnk;
    FicheroP.Save(PWChar(WFichero),False);
  end; 
 
begin 
  CreaLnk( 'c:\windows\Notepad.exe', {Ejecutable}
           'c:\Autoexec.bat',        {Argumentos}
           'c:\',                    {Diretorio de trabajo}
           'Editar Autoexec.lnk',    {Nombre del Acceso Directo}
           'c:\windows\escritorio'   {Donde hay que crearlo}
           );
end;
__________________
Saludos,
Peter Investment
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


La franja horaria es GMT +2. Ahora son las 22:49:15.


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