Ver Mensaje Individual
  #5  
Antiguo 22-08-2010
Avatar de adonias
adonias adonias is offline
Miembro
 
Registrado: ago 2007
Posts: 45
Reputación: 0
adonias Va por buen camino
Ok.

logre resolver el problema 1, junto al de no poder cliquear el form padre asi:
Código Delphi [-]
var
  F:TForm;
  I : integer;
  N : boolean;
begin
//defino como falso
N:= false;

for I := 0 to Screen.FormCount-1 do
  begin
    if Screen.Forms[i].name = 'IdChatxx'
    then N := true ; 
// si exite la ventana con ese nombre es true 
//y no abro un nuevo form con la misma conversacion
end;

//si es falso, abro la ventana con la conversacion IdChatxx
    if N = false then begin

      F := TForm.Create(Application);
      F.Name := 'IdChatxx';
      F.Show;
//creo un evento para poder tocar al form padre y si el usuario cierra 
//la ventana y hay una nuevo mensage, no me de error de nombre
      F.OnClose := EventoFree;


    end


end;



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

No se si sera la mejor manera, pero me resulto.

Ahora solo me falta mostrar el form IdChatxx, en la barra de windows
Responder Con Cita