Rodando Aplicações Windows Como mdiCHild( A Resposta :D)
Há algum tempo eu postei essa dúvida e achei um codigo que pode ser interessante pra quem quer testar
Ai vai
Pra quem quiser ver ele compilado
Aqui tem ele
http://lda.ath.cx/mdiprj.exe
Ai vai
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls
;
type
TForm1 = class(TForm)
Button1: TButton;
Lista: TListBox;
Button2: TButton;
Edit1: TEdit;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure LIstApp;
const
MAX_WINDOW = 16364;
var
I : Integer;
Caption: Array[0..255]Of Char;
//Lista : TStringList;
begin
//Lista:=TStringList.Create;
//Lista.Sorted:=True;
For I:=1 To MAX_WINDOW Do
Begin
If((GetWindowText(I,Caption,255)<>0)And (GetWindowLong(I,GWL_EXSTYLE)<>0)And
(GetWindowLong(I,GWL_HWNDPARENT)=0)And (GetWindowLong(I,GWL_HINSTANCE)<>0))Then
If(IsWindowVisible(I))Then
form1.Lista.Items.Add(inttostr(i) + ´ ´ + caption);
end;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
lista.Clear;
listapp;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
windows.SetParent(strtoint(edit1.text),form1.handle);
end;
end.
Pra quem quiser ver ele compilado
Aqui tem ele
http://lda.ath.cx/mdiprj.exe
Lucasnishimura
Curtidas 0
Respostas
Lucas Silva
15/04/2004
Gostei da dica, vou testar aqui!
GOSTEI 0