Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   API de Windows (https://www.clubdelphi.com/foros/forumdisplay.php?f=7)
-   -   Agrupar ventanas en la barra de tarea (https://www.clubdelphi.com/foros/showthread.php?t=22444)

josecristhian 15-06-2005 17:58:49

Agrupar ventanas en la barra de tarea
 
Buenas como estan, e creado todas mis ventanas para que funcionen independientemente con el siguiente codigo

Código:

procedure TForm2.CreateParams(var Params: TCreateParams);
begin
  inherited;
  Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
  Params.WndParent := GetDesktopWindow;
end;

ahora la pregunta que tengo es si existe algun componente o metodo para poder agrupar las ventanas abiertas en la barra de tareas como si fuera un menu o como la funcion que tiene el windows xp para agrupar ventanas (no se si me hago entender).

Agradeceria mucho su ayuda. GRACIAS

jorodgar 28-06-2005 22:22:10

Yo tengo el siguiente codigo. Consiste en un formulario principal, que tiene un boton. Cada vez que pulsamos ese boton crea una ventana hija. Esas ventanas hijas me gustaria que al minimizarlas aparecieran justo en la barra de tareas y no encima de ella. ¿alguien me puede ayudar? Gracias.

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, unit2, StdCtrls;


type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure CreateParams(var Params: TCreateParams); override;
end;


var
Form1: TForm1;
sMensaje:string;

implementation

{$R *.dfm}

procedure TForm1.CreateParams(var Params: TCreateParams);
begin
inherited;
Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
Params.WndParent := GetDesktopWindow;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
with TForm2.Create(Self) do
try
Show;
finally
end;
end;

end.

jorodgar 28-06-2005 22:43:33

Encontre la solución :)
 
unit main;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;

type
Tfrmain = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
frmain: Tfrmain;

implementation

uses Unit1;

{$R *.DFM}

procedure Tfrmain.Button1Click(Sender: TObject);
begin
with TForm1.Create(Self) do
try
Show;
finally
end;
end;


end.

--------------------------

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;

type
TForm1 = class(TForm)
Label1: TLabel;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
procedure CreateParams(var Params: TCreateParams); override;
public
end;

var
Form1: TForm1;

implementation

{$R *.DFM}


procedure TForm1.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
with Params do begin
ExStyle := ExStyle or WS_EX_APPWINDOW;
WndParent := GetDesktopwindow;
end;
end;


procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Free;
end;

end.


La franja horaria es GMT +2. Ahora son las 15:39:09.

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