Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #5  
Antiguo 18-08-2010
Avatar de movorack
[movorack] movorack is offline
Miguel A. Valero
 
Registrado: feb 2007
Ubicación: Bogotá - Colombia
Posts: 1.346
Poder: 22
movorack Va camino a la famamovorack Va camino a la fama
En el foro falta el botón "Gracias"...

Habia estado buscando esta información y me ha sido de gran utilidad el enlace que ha puesto nuestro compañero roman.

Para aportar, les copio el siguiente código de ejemplo que encontré aquí

Código Delphi [-]
{ Windows95/NT Toolbar registering example }
{ 2/13/97 by Brandon Sneed (Nivenh)}
{ If you use this, don't give me credit }


{ Add ShellAPI to your Uses clause }

{ This code was pulled from an app i wrote and has been modified to make
  it a little more understandable for those 'not-so-fluent' delphi coders }

{ I put it in the OnShow event, but it probably could go in the create event
  too maybe.. or anywhere else for that matter }
procedure TForm1.OnShow(Sender: TObject);
var Result : integer;
     BarData : TAppBarData;
     BarHeight : Integer;
begin

  self.ClientWidth := Screen.Width;
  BarHeight := 24; //Alto de la barra al ejecutarse

with BarData do
  begin
  cbSize := SizeOf(BarData);  { Size of the struct }
  hwnd := self.Handle;      { Window handle to register as app bar }
  uCallBackMessage := WM_USER; { Message used for APPBAR specific messages }
  uEdge := ABE_TOP;          { Side of screen to bind with }
  rc := Rect(0, 0, self.ClientWidth, BarHeight);
                              {^^ Rectangle being requested to use }
  lParam := 0;                { Only used for ABM_AUTOHIDEBAR }
  end;

Result := SHAppBarMessage(ABM_NEW, BarData);  { Register with explorer }
if Result = 0 then
  begin
  ShowMessage('Unable to register AppBar.');
  exit;
  end;

SHAppBarMessage(ABM_QUERYPOS, BarData); { Can we use BarData.RC ?? }
                                        { API wasn't clear on what this returned }
SHAppBarMessage(ABM_SETPOS, BarData);   { Set the position to be the same as in RC }
{ ^^ this is what makes everything fall into place }

with OWForm do
  begin
  Application.ProcessMessages; { Without this, it places in the wrong spot, could
                                 be an error on my part somewhere }
  SetWindowPos(Handle, HWND_BOTTOM, 0, 0, ClientWidth, BarHeight, SWP_NOREDRAW);
  { ^^ this sets the window where we want it.  at the very left edge of the screen }
  { modify this line to suit }
  end;
end;

{ NOTE:  This ONLY reigsters it as a toolbar and places it in the appropriate
  spot.  You still need to make handlers for the other ABE/ABM messages.
  See the documentation in Delphi 2.0 and up for more info.  Look up
  SHAppBarMessage }

El borde del formulario está establecido como bsNone

Saludos a todos...
__________________
Buena caza y buen remar... http://mivaler.blogspot.com

Última edición por movorack fecha: 18-08-2010 a las 18:31:28.
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

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
Algo superior a StayOnTop? FDB Varios 8 28-07-2011 18:24:12
Demostrado: Windows es superior a Linux roman La Taberna 23 25-09-2007 20:44:39
¿Alguien vende Delphi 5 ó superior? Deimos25 Varios 0 24-03-2004 20:24:22
Problema con la barra superior rvinfo Varios 4 30-11-2003 08:39:14
Delphi 5 o superior emeritos Varios 2 29-10-2003 00:56:49


La franja horaria es GMT +2. Ahora son las 18:03:49.


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