Newsgroup: it.comp.lang.delphi
Titolo: creare una piccola calcolatrice

Ciao a tutti, ho delphi6 e ho già fatto alcuni database semplici ma 
funzionali, però adesso ci vorrei integrare una piccola calcolatrice ma 
non ho assolutamente idea di come fare a memorizzare gli operatori, 
cioè se io premo un numero questo lo memorizzo in una variabile e mi 
sta bene, però quando premo l'operatore (+ * - /) non so dove metterlo 
perchè poi non mi viene in mente come potrei fare per utilizzarlo e 
calcolare l'operazione che sto facendo.
Grazie in anticipo.
Inviato da 
www.mynewsgate.net

 wrote in message
news:200405031...@mynewsgate.net

-- 
Posted via Mailgate.ORG Server - 
http://www.Mailgate.ORG

 operatori e quello delle parentesi. Non è una cosa semplicissima cmq..
mmmm...mi sa anche a me, forse mi appoggerò alla calcolatrice di 
windows....
Inviato da 
www.mynewsgate.net

 ha scritto nel messaggio
news:200405031...@mynewsgate.net...

Nei componenti "rx library" , ora jedi , trovi degli edit e dei dbedit con
calcolatrice annessa ( e date picker) e altro..
http://jvcl.sourceforge.net/
Forse ti può servire ...
Giulio

 ha scritto nel messaggio

Questo è il link di una calcolatrice
http://digilander.iol.it/diegobarichello/CalcVal.zip
Se ti aggrada dimmelo che ti posto i sorgenti da cui puoi trarre
esempio.
Ciao, diego

 non ho assolutamente idea di come fare a memorizzare gli operatori
Ti invio i sorgenti di una calcolatrice che ho fatto io quando ero alle
prime
armi con Delphi.
Sicuramente contiene molti errori e tante di quelle cose che ho scritto
potevano essere fatte meglio.
Comunque, anche se non è il massimo che si può ottenere dalla vita, può
essere utile per darti l'idea di come fare.
Tra l'altro il bello di questa calcolatrice doveva essere la sua capacità di
allargarsi e di restringersi a seconda della cecità dell'operatore.
Non mi ricordo però se ero riuscito in questo intento.
Prendila solo come materiale di studio.
FILE .DFM
object Form1: TForm1
  Left = 216
  Top = 92
  Width = 220
  Height = 290
  Caption = 'Calcolatrice'
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  Menu = MainMenu1
  OldCreateOrder = False
  PixelsPerInch = 96
  TextHeight = 13
  object EdtNumero: TEdit
    Left = 16
    Top = 8
    Width = 177
    Height = 22
    AutoSelect = False
    BiDiMode = bdLeftToRight
    Color = clInfoBk
    Font.Charset = OEM_CHARSET
    Font.Color = clWindowText
    Font.Height = -11
    Font.Name = 'Arial'
    Font.Style = []
    ParentBiDiMode = False
    ParentFont = False
    ParentShowHint = False
    ShowHint = False
    TabOrder = 0
    OnKeyPress = EdtNumeroKeyPress
  end
  object Button1: TButton
    Left = 16
    Top = 168
    Width = 33
    Height = 25
    Caption = '1'
    TabOrder = 2
    OnClick = BtnNumClick
  end
  object Button2: TButton
    Left = 64
    Top = 168
    Width = 33
    Height = 25
    Caption = '2'
    TabOrder = 3
    OnClick = BtnNumClick
  end
  object Button3: TButton
    Left = 112
    Top = 168
    Width = 33
    Height = 25
    Caption = '3'
    TabOrder = 4
    OnClick = BtnNumClick
  end
  object Button4: TButton
    Left = 16
    Top = 128
    Width = 33
    Height = 25
    Caption = '4'
    TabOrder = 5
    OnClick = BtnNumClick
  end
  object Button5: TButton
    Left = 64
    Top = 128
    Width = 33
    Height = 25
    Caption = '5'
    TabOrder = 6
    OnClick = BtnNumClick
  end
  object Button6: TButton
    Left = 112
    Top = 128
    Width = 33
    Height = 25
    Caption = '6'
    TabOrder = 7
    OnClick = BtnNumClick
  end
  object Button7: TButton
    Left = 16
    Top = 88
    Width = 33
    Height = 25
    Caption = '7'
    TabOrder = 8
    OnClick = BtnNumClick
  end
  object Button8: TButton
    Left = 64
    Top = 88
    Width = 33
    Height = 25
    Caption = '8'
    TabOrder = 9
    OnClick = BtnNumClick
  end
  object Button9: TButton
    Left = 112
    Top = 88
    Width = 33
    Height = 25
    Caption = '9'
    TabOrder = 10
    OnClick = BtnNumClick
  end
  object Button0: TButton
    Left = 16
    Top = 208
    Width = 33
    Height = 25
    Caption = '0'
    Font.Charset = DEFAULT_CHARSET
    Font.Color = clWindowText
    Font.Height = -11
    Font.Name = 'MS Sans Serif'
    Font.Style = []
    ParentFont = False
    TabOrder = 1
    OnClick = BtnNumClick
  end
  object BtnPiu: TButton
    Left = 160
    Top = 208
    Width = 33
    Height = 25
    Caption = '+'
    TabOrder = 13
    OnClick = BtnPiuClick
  end
  object BtnMeno: TButton
    Left = 160
    Top = 168
    Width = 33
    Height = 25
    Caption = '-'
    TabOrder = 14
    OnClick = BtnMenoClick
  end
  object BtnPer: TButton
    Left = 160
    Top = 128
    Width = 33
    Height = 25
    Caption = '*'
    TabOrder = 15
    OnClick = BtnPerClick
  end
  object BtnDiviso: TButton
    Left = 160
    Top = 88
    Width = 33
    Height = 25
    Caption = '/'
    TabOrder = 16
    OnClick = BtnDivisoClick
  end
  object BtnVirgola: TButton
    Left = 64
    Top = 208
    Width = 33
    Height = 25
    Caption = ','
    TabOrder = 11
    OnClick = BtnVirgolaClick
  end
  object BtnUguale: TButton
    Left = 112
    Top = 208
    Width = 33
    Height = 25
    Caption = '='
    TabOrder = 12
    OnClick = BtnUgualeClick
  end
  object BtnCanc: TButton
    Left = 160
    Top = 48
    Width = 33
    Height = 25
    Caption = 'C'
    TabOrder = 17
    OnClick = BtnCancClick
  end
  object MainMenu1: TMainMenu
    Left = 128
    Top = 48
    object N11111: TMenuItem
      Caption = 'Zoom'
      object Espandi1: TMenuItem
        Caption = 'Espandi'
        OnClick = Espandi1Click
      end
      object Riduci1: TMenuItem
        Caption = 'Riduci'
        OnClick = Riduci1Click
      end
    end
  end
end
File .PAS
unit Unit1;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Mask, StrUtils, Menus;
type
  TForm1 = class(TForm)
    EdtNumero: TEdit;
    Button1: TButton;
    Button2: TButton;
    Button3: TButton;
    Button4: TButton;
    Button5: TButton;
    Button6: TButton;
    Button7: TButton;
    Button8: TButton;
    Button9: TButton;
    Button0: TButton;
    BtnPiu: TButton;
    BtnMeno: TButton;
    BtnPer: TButton;
    BtnDiviso: TButton;
    BtnVirgola: TButton;
    BtnUguale: TButton;
    BtnCanc: TButton;
    MainMenu1: TMainMenu;
    N11111: TMenuItem;
    Espandi1: TMenuItem;
    Riduci1: TMenuItem;
    procedure BtnNumClick(Sender: TObject);
    procedure BtnCancClick(Sender: TObject);
    procedure BtnUgualeClick(Sender: TObject);
    procedure BtnPiuClick(Sender: TObject);
    procedure BtnMenoClick(Sender: TObject);
    procedure BtnPerClick(Sender: TObject);
    procedure BtnDivisoClick(Sender: TObject);
    procedure EdtNumeroKeyPress(Sender: TObject; var Key: Char);
    procedure BtnVirgolaClick(Sender: TObject);
    procedure Espandi1Click(Sender: TObject);
    procedure Riduci1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;
type
  w_SetCalc=#8..'9';
  w_MySet = set of w_SetCalc;
var
  Form1: TForm1;
  w_Numero:Double;
  w_Numero2:Double;
  w_TipOpe:Char;
  w_STipOpe:Char;
  w_DgtNum:Char;
  w_Set1:w_MySet;
  w_CntPiu:Integer;
  w_CntMen:Integer;
  w_CntPer:Integer;
  w_CntDiv:Integer;
  w_AltForm:Integer;
  w_LarForm:Integer;
  w_AltEdit:Integer;
  w_LarEdit:Integer;
  w_AltBtn:Integer;
  w_LarBtn:Integer;
  w_LefBtn8:Integer;
  w_LefBtn5:Integer;
  w_LefBtn2:Integer;
  w_LefBtnVir:Integer;
  w_LefBtn9:Integer;
  w_LefBtn6:Integer;
  w_LefBtn3:Integer;
  w_LefBtnUg:Integer;
  w_LefBtnCan:Integer;
  w_LefBtnDiv:Integer;
  w_LefBtnPer:Integer;
  w_LefBtnMen:Integer;
  w_LefBtnPiu:Integer;
  w_TopBtn7:Integer;
  w_TopBtn4:Integer;
  w_TopBtn1:Integer;
  w_TopBtn0:Integer;
  w_TopBtn8:Integer;
  w_TopBtn5:Integer;
  w_TopBtn2:Integer;
  w_TopBtnVir:Integer;
  w_TopBtn9:Integer;
  w_TopBtn6:Integer;
  w_TopBtn3:Integer;
  w_TopBtnUg:Integer;
  w_TopBtnCan:Integer;
  w_TopBtnDiv:Integer;
  w_TopBtnPer:Integer;
  w_TopBtnMeno:Integer;
  w_TopBtnPiu:Integer;
implementation
{$R *.dfm}
procedure TForm1.BtnNumClick(Sender: TObject);
Var
I:Integer;
w_BotNum:String;
begin
  EdtNumero.SetFocus;
  if w_TipOpe<>' ' then
    Begin
      EdtNumero.Text:='';
      w_STipOpe:=w_TipOpe;
      w_TipOpe:=' ';
    end;
  w_CntPiu:=0;
  w_CntMen:=0;
  w_CntPer:=0;
  w_CntDiv:=0;
  w_DgtNum:='S';
  For I:=0 to ComponentCount-1 do
    Begin
      if Form1.Components[I]=Sender then
        begin
          w_BotNum:=RightStr(Form1.Components[I].Name,1);
          EdtNumero.Text:=EdtNumero.Text+w_BotNum;
        end;
    end;
end;
procedure TForm1.BtnCancClick(Sender: TObject);
begin
  EdtNumero.SetFocus;
  EdtNumero.Text:='';
  w_Numero:=0;
  w_Numero2:=0;
  w_TipOpe:=' ';
  w_STipOpe:=' ';
  w_CntPiu:=0;
  w_CntMen:=0;
  w_CntPer:=0;
  w_CntDiv:=0;
end;
procedure TForm1.BtnUgualeClick(Sender: TObject);
begin
  EdtNumero.SetFocus;
  w_CntPiu:=0;
  w_CntMen:=0;
  w_CntPer:=0;
  w_CntDiv:=0;
  w_Numero2:=0;
  if w_DgtNum='N' then
    Begin
      w_STipOpe:=' ';
    end;
  if EdtNumero.Text <> '' then
    Begin
      w_Numero2:=StrToFloat(EdtNumero.Text);
    end;
  if w_STipOpe=' ' then
    begin
      w_Numero:=0;
      EdtNumero.Text:=FloatToStr(w_Numero2);
    end;
  if w_STipOpe='+' then
    begin
      EdtNumero.Text:=FloatToStr(w_Numero+w_Numero2);
    end;
  if w_STipOpe='-' then
    begin
      EdtNumero.Text:=FloatToStr(w_Numero-w_Numero2);
    end;
  if w_STipOpe='*' then
    begin
      EdtNumero.Text:=FloatToStr(w_Numero*w_Numero2);
    end;
  if w_STipOpe='/' then
    Begin
      if w_Numero2<>0 then
        Begin
          EdtNumero.Text:=FloatToStr(w_Numero/w_Numero2);
        end
      else
        MessageDlg('Divisione per zero !', mtWarning, [mbOk], 0);
    end;
  w_TipOpe:=' ';
  w_STipOpe:=' ';
  w_Numero:=0
end;
procedure TForm1.BtnPiuClick(Sender: TObject);
begin
EdtNumero.SetFocus;
if EdtNumero.Text<>''then
  Begin
    w_CntPiu:=w_CntPiu+1;
    if w_CntPiu=1 then
      Begin
        w_Numero:=w_Numero+StrToFloat(EdtNumero.Text);
      end
    else
      Begin
        w_STipOpe:=' ';
      end;
  end;
EdtNumero.Text:=FloatToStr(w_Numero);
w_TipOpe:='+'
end;
procedure TForm1.BtnMenoClick(Sender: TObject);
Var
w_ValEdit:Double;
begin
EdtNumero.SetFocus;
if EdtNumero.Text<>''then
  Begin
    w_ValEdit:=StrToFloat(EdtNumero.Text);
    w_CntMen:=w_CntMen+1;
    if w_CntMen=1 then
      Begin
        if (w_ValEdit<>0) and (w_Numero<>0) then
          Begin
            w_Numero:=w_Numero-StrToFloat(EdtNumero.Text);
          end
        else
          Begin
            w_Numero:=StrToFloat(EdtNumero.Text)
          end;
      end
    else
      Begin
        w_STipOpe:=' ';
      end;
  end;
EdtNumero.Text:=FloatToStr(w_Numero);
w_TipOpe:='-'
end;
procedure TForm1.BtnPerClick(Sender: TObject);
Var
w_ValEdit:Double;
begin
EdtNumero.SetFocus;
if EdtNumero.Text<>''then
  Begin
    w_ValEdit:=StrToFloat(EdtNumero.Text);
    w_CntPer:=w_CntPer+1;
    if w_CntPer=1 then
      Begin
        if (w_ValEdit<>0) and (w_Numero<>0) then
          Begin
            w_Numero:=w_Numero*StrToFloat(EdtNumero.Text);
          end
        else
          Begin
            w_Numero:=StrToFloat(EdtNumero.Text)
          end;
       end
    else
      Begin
        w_STipOpe:=' ';
      end;
  end;
EdtNumero.Text:=FloatToStr(w_Numero);
w_TipOpe:='*'
end;
procedure TForm1.BtnDivisoClick(Sender: TObject);
Var
w_ValEdit:Double;
begin
EdtNumero.SetFocus;
if EdtNumero.Text<>''then
  Begin
    w_ValEdit:=StrToFloat(EdtNumero.Text);
    w_CntDiv:=w_CntDiv+1;
    if w_CntDiv=1 then
      Begin
        if (w_ValEdit<>0) and (w_Numero<>0) then
          Begin
            w_Numero:=w_Numero/StrToFloat(EdtNumero.Text);
          end
        else
          Begin
            w_Numero:=StrToFloat(EdtNumero.Text)
          end;
      end
    else
      Begin
        w_STipOpe:=' ';
      end;
  end;
EdtNumero.Text:=FloatToStr(w_Numero);
w_TipOpe:='/'
end;
procedure TForm1.EdtNumeroKeyPress(Sender: TObject; var Key: Char);
Var
w_Virg:Pchar;
begin
w_CntPiu:=0;
w_CntMen:=0;
w_CntPer:=0;
w_CntDiv:=0;
w_DgtNum:='S';
if (w_TipOpe<>' ') and (key in w_Set1) and (key<>#8) then
  Begin
    EdtNumero.Text:='';
  end;
if w_TipOpe<>' ' then
  Begin
    EdtNumero.Text:='';
    w_STipOpe:=w_TipOpe;
    w_TipOpe:=' ';
  end;
if not (key in w_Set1) then
  begin
    key:=#0;
  end;
w_Virg:=strscan(Pchar(EdtNumero.Text),',');
if (w_Virg<>Nil) and (key=',') then
  begin
    key:=#0;
  end;
end;
procedure TForm1.BtnVirgolaClick(Sender: TObject);
Var
w_Virg:Pchar;
begin
w_Virg:=strscan(Pchar(EdtNumero.Text),',');
if w_Virg=Nil then
  begin
    EdtNumero.Text:=EdtNumero.Text+',';
  end;
end;
procedure TForm1.Espandi1Click(Sender: TObject);
begin
  // Mi salvo la grandezza e le posizioni dei Componenti
  Form1.Top:=30;
  Form1.Left:=52;
  w_AltForm:=Form1.Height;
  w_LarForm:=Form1.Width;
  w_AltEdit:=EdtNumero.Height;
  w_LarEdit:=EdtNumero.Width;
  w_AltBtn:=Button0.Height;
  w_LarBtn:=Button0.Width;
  w_LefBtn8:=Button8.Left;
  w_LefBtn5:=Button5.Left;
  w_LefBtn2:=Button2.Left;
  w_LefBtnVir:=BtnVirgola.Left;
  w_LefBtn9:=Button9.Left;
  w_LefBtn6:=Button6.Left;
  w_LefBtn3:=Button3.Left;
  w_LefBtnUg:=BtnUguale.Left;
  w_LefBtnCan:=BtnCanc.Left;
  w_LefBtnDiv:=BtnDiviso.Left;
  w_LefBtnPer:=BtnPer.Left;
  w_LefBtnMen:=BtnMeno.Left;
  w_LefBtnPiu:=BtnPiu.Left;
  w_TopBtn7:=Button7.Top;
  w_TopBtn4:=Button4.Top;
  w_TopBtn1:=Button1.Top;
  w_TopBtn0:=Button0.Top;
  w_TopBtn8:=Button8.Top;
  w_TopBtn5:=Button5.Top;
  w_TopBtn2:=Button2.Top;
  w_TopBtnVir:=BtnVirgola.Top;
  w_TopBtn9:=Button9.Top;
  w_TopBtn6:=Button6.Top;
  w_TopBtn3:=Button3.Top;
  w_TopBtnUg:=BtnUguale.Top;
  w_TopBtnCan:=BtnCanc.Top;
  w_TopBtnDiv:=BtnDiviso.Top;
  w_TopBtnPer:=BtnPer.Top;
  w_TopBtnMeno:=BtnMeno.Top;
  w_TopBtnPiu:=BtnPiu.Top;
  // Ingrandisco i Componenti e li Sposto
  Form1.Height:=(Form1.Height*2)-100;
  Form1.Width:=Form1.Width*2;
  EdtNumero.Height:=EdtNumero.Height*2;
  EdtNumero.Width:=(EdtNumero.Width*2)+45;
  Button0.Height:=Button0.Height*2;
  Button1.Height:=Button1.Height*2;
  Button2.Height:=Button2.Height*2;
  Button3.Height:=Button3.Height*2;
  Button4.Height:=Button4.Height*2;
  Button5.Height:=Button5.Height*2;
  Button6.Height:=Button6.Height*2;
  Button7.Height:=Button7.Height*2;
  Button8.Height:=Button8.Height*2;
  Button9.Height:=Button9.Height*2;
  BtnPiu.Height:=BtnPiu.Height*2;
  BtnMeno.Height:=BtnMeno.Height*2;
  BtnPer.Height:=BtnPer.Height*2;
  BtnDiviso.Height:=BtnDiviso.Height*2;
  BtnVirgola.Height:=BtnVirgola.Height*2;
  BtnUguale.Height:=BtnUguale.Height*2;
  BtnCanc.Height:=BtnCanc.Height*2;
  Button0.Width:=Button0.Width*2;
  Button1.Width:=Button1.Width*2;
  Button2.Width:=Button2.Width*2;
  Button3.Width:=Button3.Width*2;
  Button4.Width:=Button4.Width*2;
  Button5.Width:=Button5.Width*2;
  Button6.Width:=Button6.Width*2;
  Button7.Width:=Button7.Width*2;
  Button8.Width:=Button8.Width*2;
  Button9.Width:=Button9.Width*2;
  BtnPiu.Width:=BtnPiu.Width*2;
  BtnMeno.Width:=BtnMeno.Width*2;
  BtnPer.Width:=BtnPer.Width*2;
  BtnDiviso.Width:=BtnDiviso.Width*2;
  BtnVirgola.Width:=BtnVirgola.Width*2;
  BtnUguale.Width:=BtnUguale.Width*2;
  BtnCanc.Width:=BtnCanc.Width*2;
  Button8.Left:=(Button8.Left*2)-1;
  Button5.Left:=(Button5.Left*2)-1;
  Button2.Left:=(Button2.Left*2)-1;
  BtnVirgola.Left:=(BtnVirgola.Left*2)-1;
  Button9.Left:=(Button9.Left*2)+15;
  Button6.Left:=(Button6.Left*2)+15;
  Button3.Left:=(Button3.Left*2)+15;
  BtnUguale.Left:=(BtnUguale.Left*2)+15;
  BtnCanc.Left:=(BtnCanc.Left*2)+29;
  BtnDiviso.Left:=(BtnDiviso.Left*2)+29;
  BtnPer.Left:=(BtnPer.Left*2)+29;
  BtnMeno.Left:=(BtnMeno.Left*2)+29;
  BtnPiu.Left:=(BtnPiu.Left*2)+29;
  Button7.Top:=(Button7.Top+50);
  Button4.Top:=(Button4.Top+85);
  Button1.Top:=(Button1.Top+120);
  Button0.Top:=(Button0.Top+155);
  Button8.Top:=(Button8.Top+50);
  Button5.Top:=(Button5.Top+85);
  Button2.Top:=(Button2.Top+120);
  BtnVirgola.Top:=(BtnVirgola.Top+155);
  Button9.Top:=(Button9.Top+50);
  Button6.Top:=(Button6.Top+85);
  Button3.Top:=(Button3.Top+120);
  BtnUguale.Top:=(BtnUguale.Top+155);
  BtnCanc.Top:=(BtnCanc.Top+15);
  BtnDiviso.Top:=(BtnDiviso.Top+50);
  BtnPer.Top:=(BtnPer.Top+85);
  BtnMeno.Top:=(BtnMeno.Top+120);
  BtnPiu.Top:=(BtnPiu.Top+155);
  // Ingrandisco i Font dei Componenti
  EdtNumero.Font.Size:=24;
  Button0.Font.Size:=24;
  Button1.Font.Size:=24;
  Button2.Font.Size:=24;
  Button3.Font.Size:=24;
  Button4.Font.Size:=24;
  Button5.Font.Size:=24;
  Button6.Font.Size:=24;
  Button7.Font.Size:=24;
  Button8.Font.Size:=24;
  Button9.Font.Size:=24;
  BtnVirgola.Font.Size:=24;
  BtnUguale.Font.Size:=24;
  BtnCanc.Font.Size:=24;
  BtnDiviso.Font.Size:=24;
  BtnPer.Font.Size:=24;
  BtnMeno.Font.Size:=24;
  BtnPiu.Font.Size:=24;
end;
procedure TForm1.Riduci1Click(Sender: TObject);
begin
  EdtNumero.Height:=w_AltEdit;
  EdtNumero.Width:=w_LarEdit;
  Button0.Height:=w_AltBtn;
  Button1.Height:=w_AltBtn;
  Button2.Height:=w_AltBtn;
  Button3.Height:=w_AltBtn;
  Button4.Height:=w_AltBtn;
  Button5.Height:=w_AltBtn;
  Button6.Height:=w_AltBtn;
  Button7.Height:=w_AltBtn;
  Button8.Height:=w_AltBtn;
  Button9.Height:=w_AltBtn;
  BtnPiu.Height:=w_AltBtn;
  BtnMeno.Height:=w_AltBtn;
  BtnPer.Height:=w_AltBtn;
  BtnDiviso.Height:=w_AltBtn;
  BtnVirgola.Height:=w_AltBtn;
  BtnUguale.Height:=w_AltBtn;
  BtnCanc.Height:=w_AltBtn;
  Button0.Width:=w_LarBtn;
  Button1.Width:=w_LarBtn;
  Button2.Width:=w_LarBtn;
  Button3.Width:=w_LarBtn;
  Button4.Width:=w_LarBtn;
  Button5.Width:=w_LarBtn;
  Button6.Width:=w_LarBtn;
  Button7.Width:=w_LarBtn;
  Button8.Width:=w_LarBtn;
  Button9.Width:=w_LarBtn;
  BtnPiu.Width:=w_LarBtn;
  BtnMeno.Width:=w_LarBtn;
  BtnPer.Width:=w_LarBtn;
  BtnDiviso.Width:=w_LarBtn;
  BtnVirgola.Width:=w_LarBtn;
  BtnUguale.Width:=w_LarBtn;
  BtnCanc.Width:=w_LarBtn;
  Button8.Left:=w_LefBtn8;
  Button5.Left:=w_LefBtn5;
  Button2.Left:=w_LefBtn2;
  BtnVirgola.Left:=w_LefBtnVir;
  Button9.Left:=w_LefBtn9;
  Button6.Left:=w_LefBtn6;
  Button3.Left:=w_LefBtn3;
  BtnUguale.Left:=w_LefBtnUg;
  BtnCanc.Left:=w_LefBtnCan;
  BtnDiviso.Left:=w_LefBtnDiv;
  BtnPer.Left:=w_LefBtnPer;
  BtnMeno.Left:=w_LefBtnMen;
  BtnPiu.Left:=w_LefBtnPiu;
  Button7.Top:=w_TopBtn7;
  Button4.Top:=w_TopBtn4;
  Button1.Top:=w_TopBtn1;
  Button0.Top:=w_TopBtn0;
  Button8.Top:=w_TopBtn8;
  Button5.Top:=w_TopBtn5;
  Button2.Top:=w_TopBtn2;
  BtnVirgola.Top:=w_TopBtnVir;
  Button9.Top:=w_TopBtn9;
  Button6.Top:=w_TopBtn6;
  Button3.Top:=w_TopBtn3;
  BtnUguale.Top:=w_TopBtnUg;
  BtnCanc.Top:=w_TopBtnCan;
  BtnDiviso.Top:=w_TopBtnDiv;
  BtnPer.Top:=w_TopBtnPer;
  BtnMeno.Top:=w_TopBtnMeno;
  BtnPiu.Top:=w_TopBtnPiu;
  // Riduco i Font dei Componenti
  EdtNumero.Font.Size:=8;
  Button0.Font.Size:=8;
  Button1.Font.Size:=8;
  Button2.Font.Size:=8;
  Button3.Font.Size:=8;
  Button4.Font.Size:=8;
  Button5.Font.Size:=8;
  Button6.Font.Size:=8;
  Button7.Font.Size:=8;
  Button8.Font.Size:=8;
  Button9.Font.Size:=8;
  BtnVirgola.Font.Size:=8;
  BtnUguale.Font.Size:=8;
  BtnCanc.Font.Size:=8;
  BtnDiviso.Font.Size:=8;
  BtnPer.Font.Size:=8;
  BtnMeno.Font.Size:=8;
  BtnPiu.Font.Size:=8;
  Form1.Top:=92;
  Form1.Left:=216;
  Form1.Height:=w_AltForm;
  Form1.Width:=w_LarForm;
end;
Initialization
w_CntPiu:=0;
w_CntMen:=0;
w_CntPer:=0;
w_CntDiv:=0;
w_Numero:=0;
w_Numero2:=0;
w_TipOpe:=' ';
w_STipOpe:=' ';
w_DgtNum:='N';
w_Set1:=['0','1','2','3','4','5','6','7','8','9','+','-',',',#8];
w_AltForm:=290;
w_LarForm:=220;
w_AltEdit:=22;
w_LarEdit:=177;
w_AltBtn:=25;
w_LarBtn:=33;
w_LefBtn8:=64;
w_LefBtn5:=64;
w_LefBtn2:=64;
w_LefBtnVir:=64;
w_LefBtn9:=112;
w_LefBtn6:=112;
w_LefBtn3:=112;
w_LefBtnUg:=112;
w_LefBtnCan:=160;
w_LefBtnDiv:=160;
w_LefBtnPer:=160;
w_LefBtnMen:=160;
w_LefBtnPiu:=160;
w_TopBtn7:=88;
w_TopBtn4:=128;
w_TopBtn1:=168;
w_TopBtn0:=208;
w_TopBtn8:=88;
w_TopBtn5:=128;
w_TopBtn2:=168;
w_TopBtnVir:=208;
w_TopBtn9:=88;
w_TopBtn6:=128;
w_TopBtn3:=168;
w_TopBtnUg:=208;
w_TopBtnCan:=48;
w_TopBtnDiv:=88;
w_TopBtnPer:=128;
w_TopBtnMeno:=168;
w_TopBtnPiu:=208;
end.
Spero di esserti stato utile.
Donato Di Tullio

 
Grazie, molto volentieri, faccio spazio nella casella perchè sarà piena 
di virus..è un indirizzo da battaglia ;-)
Inviato da 
www.mynewsgate.net

Grazie, sicuramente ci caverò qualcosa, già ho visto una possibile 
soluzione.
Inviato da 
www.mynewsgate.net