Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #11  
Antiguo 14-03-2007
Avatar de Delphius
[Delphius] Delphius is offline
Miembro Premium
 
Registrado: jul 2004
Ubicación: Salta, Argentina
Posts: 5.582
Poder: 25
Delphius Va camino a la fama
Yo tenía una unidad que hice en mis primeros momentos en Delphi... al cabo de un tiempo me di cuenta de que era una unidad sin utilidad...
pues se las paso... a lo mejor a alguien le sirva

Código Delphi [-]
unit WindowsUses;

interface

uses Windows, SysUtils, Forms, Messages, Classes;

procedure Mostrar(Forma: TForm;Value:Boolean;PosX,PosY:integer);
procedure ExpandirForma(Forma:TForm;Ancho,Largo:integer);
function FormaCreada(Nombre: String): boolean;
procedure DestruirForma(Forma: TForm);
procedure MinimizarForma(Forma: TForm);
procedure MaximizarForma(Forma: TForm);
procedure RestaurarForma(Forma: TForm);
procedure MinimizarAplicacion;
procedure FinalizarAplicacion;

implementation

procedure Mostrar(Forma: TForm;Value:Boolean;PosX,PosY:integer);
var Ban: Boolean;
begin
Ban := FormaCreada(Forma.Name);
if Ban
   then begin
        with Forma do
          begin
          Left := PosX;
          Top := PosY;
          Visible := Value;
          end;
        end;
end;

procedure ExpandirForma(Forma:TForm;Ancho,Largo:integer);
var Ban: boolean;
begin
ban := FormaCreada(Forma.Name);
if Ban then begin
            with Forma do
              begin
              Height:= Largo;
              Width:= Ancho;
              end;
            end;
end;

function FormaCreada(Nombre: string): boolean;
var Ban: boolean;
    i: integer;
begin
Ban := False;
i := 0;
while (Ban = False) and (i<= Screen.FormCount-1) do
  begin
  if Screen.Forms[i].Name = Nombre
    then ban := True
    else Inc(i,1);
  end;
Result := Ban;
end;

procedure DestruirForma(Forma: TForm);
var Ban: boolean;
begin
Ban := FormaCreada(Forma.Name);
if Ban
   then Forma.Destroy;
end;

procedure MinimizarForma(Forma: TForm);
var Ban: boolean;
begin
Ban := FormaCreada(Forma.Name);
if Ban then begin
            with Forma do
            WindowState := wsMinimized;
            end;
end;

procedure MaximizarForma(Forma: TForm);
var Ban: boolean;
begin
Ban := FormaCreada(Forma.Name);
if Ban then begin
            with Forma do
            WindowState := wsMaximized;
            end;
end;

procedure RestaurarForma(Forma: TForm);
var Ban: boolean;
begin
Ban := FormaCreada(Forma.Name);
if Ban then begin
            with Forma do
            WindowState := wsNormal;
            end;
end;

procedure MinimizarAplicacion;
begin
Application.Minimize;
end;

procedure FinalizarAplicacion;
begin
Application.Terminate;
end;

end.

Saludos,
__________________
Delphius
[Guia de estilo][Buscar]
Responder Con Cita
 



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
Utilidad para comparar dos bases de datos. avmm2004 Varios 1 16-11-2006 20:47:22
Utilidad para contar lineas de código Alexander Varios 10 18-10-2006 00:14:55
Utilidad para manejo de lista TODO ANG4L Varios 3 02-08-2006 09:36:39
Cual es la utilidad de la paleta Server Gelmin Servers 1 05-03-2004 22:20:36
utilidad del application.tag Giniromero OOP 8 17-10-2003 12:21:53


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


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
Copyright 1996-2007 Club Delphi