Ver Mensaje Individual
  #10  
Antiguo 01-01-2009
Avatar de Lepe
[Lepe] Lepe is offline
Miembro Premium
 
Registrado: may 2003
Posts: 7.424
Reputación: 29
Lepe Va por buen camino
sólo te falta un begin... end porque dicho if tiene más de una instrucción dentro:
Código Delphi [-]
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
begin
  Label1.Caption:= 'Contraseña correcta'
  Application.CreateForm(TForm2,Form2)
  Form2.Show
end
else
 Label1.Caption:='contraseña incorrecta';

end;

end.

COmo hago para llamar un segundo formulario desde el formulario principal?[/quote]
__________________
Si usted entendió mi comentario, contácteme y gustosamente,
se lo volveré a explicar hasta que no lo entienda, Gracias.
Responder Con Cita