contador gratis

Sitos recomendados:
Paginas Web Gratis
MediaFire - Free File Hosting Made Simple
Test your Internet connection speed at Speedtest.net
GameDuell
Netbookdirect.net
TV Online
LaDisKotekA
Promociones Web
Contador gratis
Intercambio de Banners
google.es
yahoo.com
NBCLatino
Risas



 


Avi a pantalla completa con MediaPlayer


Usaremos la propiedad Display y DisplayRect del MediaPlayer:
 
-Crea una form (Form1) y pon un TMediaPlayer (MediaPlayer1) en ella.
-Pon la propiedad BorderStyle de Form1 a bsNone
-Pon la propiedad WindowState de Form1 a wsMaximized
-En la propiedad Display de MediaPlayer1 pon Form1
-Asignale un fichero AVI a MediaPlayer1
-Pon la propiedad AutoOpen de Mediaplayer a TRUE
-Pon este código en el evento OnCreate de Form1:
 
procedure TForm1.FormCreate(Sender: TObject);
var
   Rectangulo:TRect;
begin
  with Rectangulo do
  begin
    Left:=0;
    Top:=0;
    Right:=Screen.Width;
    Bottom:=Screen.Height;
  end;
  MediaPlayer1.DisplayRect:=Rectangulo;
  MediaPlayer1.Play;
end;
 
 

OBTENER EL DIRECTORIO DE WINDOWS
 
Pon un Tlabel (Label1) y pon esthe código dentro del onClick de un boton:
 

procedure TForm1.Button5Click(Sender: TObject);

 
 function GetWindowsDirectory : String;
 var
     pcWindowsDirectory : PChar;
     dwWDSize           : DWORD;
 begin
     dwWDSize := MAX_PATH + 1;
     GetMem( pcWindowsDirectory, dwWDSize );
     try
        if Windows.GetWindowsDirectory( pcWindowsDirectory, dwWDSize ) <> 0 then
           Result := pcWindowsDirectory;
     finally
        FreeMem( pcWindowsDirectory );
     end;
 end;
begin
   Label1.Caption:=GetWindowsDirectory;
end;
 
 
 
OBTENER EL DIRECTORIO EN CURSO
 
Pon un tLabel (Label1) y en el OnClick de un boton, mete este código:
 

procedure TForm1.Button7Click(Sender: TObject);

 
 function GetCurrentDirectory: String;
 var
     nBufferLength : DWORD;
     lpBuffer   : PChar;
 begin
     nBufferLength := MAX_PATH + 1;
     GetMem( lpBuffer, nBufferLength );
     try
        if Windows.GetCurrentDirectory( nBufferLength, lpBuffer ) > 0 then
           Result := lpBuffer;
     finally
        FreeMem( lpBuffer );
     end;
 end;
begin
 Label1.Caption:=GetCurrentDirectory;
end;
 
 

OBTENER EL PATH HACIA EL EXLORADOR WEB INSTALADO POR DEFECTO
 
- Añade 'Registry' en la clausula uses de tu form
- Crea una form con un TLabel (Label1) y un TButton (Button1)
- En el evento OnClick del TButton pon este código:
 

procedure TForm1.Button1Click(Sender: TObject);

 
   {se debe hacer un uses de la unit Registry}
    var
       Registro : TRegistry;
       KeyName: String;
       ValueStr: String;
    begin
     Registro := TRegistry.Create;
     try
     Registro.RootKey := HKEY_CLASSES_ROOT;
     KeyName := 'htmlfileshellopencommand';
     if Registro.OpenKey(KeyName, False) then
     begin
       ValueStr := Registro.ReadString('');
       {En ValueStr se recibe la ruta completa del navegador
       predeterminado, si le añadimos una URL o un fichero
       HTML local nos abrirá el navegador con esa página}
       Registro.CloseKey;
       Label1.Caption:=ValueStr;
       {Sigue el enlace para ver la funciónWinExecNoWait32}
     end
     else
       ShowMessage('No posee explorador de HTML predeterminado');
     finally
       Registro.Free;
     end;
end;
 
 
 
Y el Label 1 te mostrará el path hacia el explorador web predeterminado de tu sistema.
 
EJECUTAR EL EXPLORADOR WEB POR DEFECTO
 
Incluye 'ShellApi' en el uses de tu fom y ejecuta esto:
 

ShellExecute(Form1.Handle,nil,PChar('index.html'),'','',SW_SHOWNORMAL); 

 
 

 

↓Click en donaciones!
relojes web gratis

relojes web gratis

Publicidad

El portal que comparte sus ingresos


Las descargas libres. Comparte tu conocimiento. Copyright © 2009 -2011
 
Hoy Hubo 1 visitantes¡Aqui en esta página! Grascias
Alta en Buscadores GRATIS
Alta en Buscadores GRATIS
Si No escuchas la radio click aqui
 
Nota: Esta pág. no contiene ningún archivo en su servidor, todo son enlaces externos, por lo que no se responsabiliza de una ruptura del mismo. Cualquier problema notificarme y tratare de solucionar el problema. Esto lo pueden hacer en la sección  (Contacto). Gracias.
Este sitio web fue creado de forma gratuita con PaginaWebGratis.es. ¿Quieres también tu sitio web propio?
Registrarse gratis