Ver Mensaje Individual
  #9  
Antiguo 31-12-2008
*Ghost* *Ghost* is offline
Registrado
 
Registrado: dic 2009
Posts: 1
Reputación: 0
*Ghost* Va por buen camino
Hola, bueno soy nuevo en delphi y me ha gustado esta web, tenia una duda aver si me ayudan que no he entendido muy bien:

Código:
unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    SpeedButton1: TSpeedButton;
       procedure SpeedButton1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  nombre: Integer;

implementation

uses Unit2;

{$R *.dfm}



procedure TForm1.SpeedButton1Click(Sender: TObject);
begin
nombre:= 123456;
if edit1.Text = inttostr(nombre) then
Label1.Caption:= 'Contraseña correcta'
Application.CreateForm(TForm2,Form2)
Form2.Show
else
Label1.Caption:='contraseña incorrecta';
end;

end.
COmo hago para llamar un segundo formulario desde el formulario principal?
Responder Con Cita