Ver Mensaje Individual
  #31  
Antiguo 24-02-2008
rauros rauros is offline
Miembro
 
Registrado: feb 2008
Ubicación: Alicante - Sax / Sax - Alicante
Posts: 235
Reputación: 19
rauros Va por buen camino
Exactamente lo que tengo es poco. Ya que hay errores, y los pongo en comentarios para probar lo poco que tengo ... Tengo :

Código Delphi [-]
program calculadoraalgebra;

uses
  Forms,
  calculadora_de_algebra in 'calculadora_de_algebra.pas' {Form1};

{$R *.res}

begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.

Código Delphi [-]
unit calculadora_de_algebra;

interface

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

type
  TForm1 = class(TForm)
    Image1: TImage;
    Edit1: TEdit;
    Edit2: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Label4: TLabel;
    Button1: TButton;
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  incognita: integer;
  partizq: integer;
  partder: integer;
  x: integer;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
begin
Image1.Picture.LoadFromFile('fondo.bmp');
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
label4.caption:='';
partizq := StrToInt(edit1.text);
partder := StrToInt(edit2.text);
for x := 1 to 100 do
if partizq = partder then begin
label4.caption := IntToStr(x);
end
end;
end.

Código Delphi [-]
object Form1: TForm1
  Left = 284
  Top = 177
  Width = 387
  Height = 268
  Caption = 'Form1'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  OnCreate = FormCreate
  PixelsPerInch = 96
  TextHeight = 13
  object Image1: TImage
    Left = 0
    Top = 0
    Width = 377
    Height = 233
  end
  object Label1: TLabel
    Left = 128
    Top = 64
    Width = 119
    Height = 13
    Caption = 'La incógnita siempre es x'
  end
  object Label2: TLabel
    Left = 176
    Top = 32
    Width = 6
    Height = 13
    Caption = '='
  end
  object Label3: TLabel
    Left = 40
    Top = 96
    Width = 51
    Height = 13
    Caption = 'Resultado:'
  end
  object Label4: TLabel
    Left = 96
    Top = 96
    Width = 3
    Height = 13
  end
  object Edit1: TEdit
    Left = 40
    Top = 32
    Width = 121
    Height = 21
    TabOrder = 0
  end
  object Edit2: TEdit
    Left = 200
    Top = 32
    Width = 121
    Height = 21
    TabOrder = 1
  end
  object Button1: TButton
    Left = 152
    Top = 112
    Width = 75
    Height = 25
    Caption = 'Calcular'
    TabOrder = 2
    OnClick = Button1Click
  end
end
Responder Con Cita