Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
Speedy Edit - Principale.pas

Principale.pas

Caricato da: TheKaneB
Scarica il programma completo

  1. unit Principale;
  2.  
  3. interface
  4.  
  5. uses
  6.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  7.   ComCtrls, StdCtrls, Menus, ToolWin, Buttons, ImgList, ExtCtrls;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     RichEdit1: TRichEdit;
  12.     StatusBar1: TStatusBar;
  13.     MainMenu1: TMainMenu;
  14.     File1: TMenuItem;
  15.     Nuovo1: TMenuItem;
  16.     Apri1: TMenuItem;
  17.     Salva1: TMenuItem;
  18.     Salvaconnome1: TMenuItem;
  19.     N1: TMenuItem;
  20.     Invia1: TMenuItem;
  21.     Stampa1: TMenuItem;
  22.     Impostastampante1: TMenuItem;
  23.     N2: TMenuItem;
  24.     Esci1: TMenuItem;
  25.     Modifica1: TMenuItem;
  26.     AnnullaRipeti1: TMenuItem;
  27.     N3: TMenuItem;
  28.     Copia1: TMenuItem;
  29.     Taglia1: TMenuItem;
  30.     Incolla1: TMenuItem;
  31.     Selezionatutto1: TMenuItem;
  32.     N4: TMenuItem;
  33.     Carattere1: TMenuItem;
  34.     Visualizza1: TMenuItem;
  35.     mrighello: TMenuItem;
  36.     mwrap: TMenuItem;
  37.     N6: TMenuItem;
  38.     About1: TMenuItem;
  39.     ImageList1: TImageList;
  40.     ToolBar1: TToolBar;
  41.     bnuovo: TToolButton;
  42.     bapri: TToolButton;
  43.     bsalva: TToolButton;
  44.     ToolButton4: TToolButton;
  45.     bstampa: TToolButton;
  46.     ToolButton6: TToolButton;
  47.     btaglia: TToolButton;
  48.     bcopia: TToolButton;
  49.     bincolla: TToolButton;
  50.     ToolButton10: TToolButton;
  51.     bundo: TToolButton;
  52.     ToolButton12: TToolButton;
  53.     bemail: TToolButton;
  54.     ToolButton14: TToolButton;
  55.     binfo: TToolButton;
  56.     ToolBar2: TToolBar;
  57.     ToolButton20: TToolButton;
  58.     elenpunt: TToolButton;
  59.     ToolButton22: TToolButton;
  60.     bsin: TToolButton;
  61.     bcen: TToolButton;
  62.     bdes: TToolButton;
  63.     ToolButton28: TToolButton;
  64.     bfont: TSpeedButton;
  65.     ToolButton29: TToolButton;
  66.     bcol: TToolButton;
  67.     ToolButton31: TToolButton;
  68.     baum: TToolButton;
  69.     bdim: TToolButton;
  70.     bar: TSpeedButton;
  71.     gra: TSpeedButton;
  72.     cor: TSpeedButton;
  73.     sot: TSpeedButton;
  74.     CoolBar1: TCoolBar;
  75.     Ruler: TPanel;
  76.     rulerline: TBevel;
  77.     LeftInd: TLabel;
  78.     FirstInd: TLabel;
  79.     RightInd: TLabel;
  80.     OpenDialog1: TOpenDialog;
  81.     SaveDialog1: TSaveDialog;
  82.     PrintDialog1: TPrintDialog;
  83.     PrinterSetupDialog1: TPrinterSetupDialog;
  84.     ColorDialog1: TColorDialog;
  85.     FontDialog1: TFontDialog;
  86.     PopupMenu1: TPopupMenu;
  87.     aglia1: TMenuItem;
  88.     Copia2: TMenuItem;
  89.     Incolla2: TMenuItem;
  90.     N7: TMenuItem;
  91.     SelezionaTuttu1: TMenuItem;
  92.     N8: TMenuItem;
  93.     Annulla1: TMenuItem;
  94.     procedure ShowHint(Sender: TObject);
  95.     procedure RichEdit1SelectionChange(Sender: TObject);
  96.     procedure FormCreate(Sender: TObject);
  97.     procedure bnuovoClick(Sender: TObject);
  98.     procedure FormPaint(Sender: TObject);
  99.     procedure FormResize(Sender: TObject);
  100.     procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
  101.     procedure bapriClick(Sender: TObject);
  102.     procedure bsalvaClick(Sender: TObject);
  103.     procedure Salvaconnome1Click(Sender: TObject);
  104.     procedure Stampa1Click(Sender: TObject);
  105.     procedure bstampaClick(Sender: TObject);
  106.     procedure Impostastampante1Click(Sender: TObject);
  107.     procedure bcopiaClick(Sender: TObject);
  108.     procedure btagliaClick(Sender: TObject);
  109.     procedure bincollaClick(Sender: TObject);
  110.     procedure Selezionatutto1Click(Sender: TObject);
  111.     procedure bfontClick(Sender: TObject);
  112.     procedure graClick(Sender: TObject);
  113.     procedure corClick(Sender: TObject);
  114.     procedure sotClick(Sender: TObject);
  115.     procedure barClick(Sender: TObject);
  116.     procedure elenpuntClick(Sender: TObject);
  117.     procedure Allineamento(Sender: TObject);
  118.     procedure bcolClick(Sender: TObject);
  119.     procedure baumClick(Sender: TObject);
  120.     procedure bdimClick(Sender: TObject);
  121.     procedure rulitmdown(Sender: TObject; Button: TMouseButton;
  122.       Shift: TShiftState; X, Y: Integer);
  123.     procedure rulitmmove(Sender: TObject; Shift: TShiftState; X,
  124.       Y: Integer);
  125.     procedure fstindup(Sender: TObject; Button: TMouseButton;
  126.       Shift: TShiftState; X, Y: Integer);
  127.     procedure lftindup(Sender: TObject; Button: TMouseButton;
  128.       Shift: TShiftState; X, Y: Integer);
  129.     procedure rgtindup(Sender: TObject; Button: TMouseButton;
  130.       Shift: TShiftState; X, Y: Integer);
  131.     procedure RulerResize(Sender: TObject);
  132.     procedure bundoClick(Sender: TObject);
  133.     procedure mrighelloClick(Sender: TObject);
  134.     procedure mwrapClick(Sender: TObject);
  135.     procedure bemailClick(Sender: TObject);
  136.     procedure Esci1Click(Sender: TObject);
  137.     procedure binfoClick(Sender: TObject);
  138.   private
  139.     FDragOfs: Integer;
  140.     FDragging: Boolean;
  141.     procedure SetupRuler;
  142.     procedure SetEditRect;
  143.     procedure solotesto;
  144.     procedure IdleLoop(Sender: TObject; var Done: Boolean);
  145.   public
  146.     { Public declarations }
  147.   end;
  148.  
  149. var
  150.   Form1: TForm1;
  151.   sfile: string;
  152.   m, mess: integer;
  153.   salvato: boolean;
  154. implementation
  155. uses Mapi, About, richedit;
  156. const
  157.   versione = 'SpeedyEdit 2.5.4 -by KaneB-';
  158.   extversione = '2.5beta4 Freeware';
  159.   ndoc = 'Nuovo Documento';
  160.   RulerAdj = 4/3;
  161.   GutterWid = 6;
  162. {$R *.DFM}
  163.  
  164. procedure TForm1.setupruler;
  165. var
  166.   i: integer;
  167.   s: string;
  168. begin
  169.   setlength(s, 201);
  170.   i:=1;
  171.   while i<200 do
  172.   begin
  173.     s[i]:=#9;
  174.     s[i+1]:='|';
  175.     inc(i,2);
  176.   end;
  177.   ruler.Caption:=s;
  178. end;
  179.  
  180. procedure TForm1.RichEdit1SelectionChange(Sender: TObject);
  181. begin
  182.   with richedit1.paragraph do
  183.     try
  184.       FirstInd.Left:=Trunc(FirstIndent*RulerAdj)-4+GutterWid;
  185.       LeftInd.Left:=trunc((leftindent+firstindent)*RulerAdj)-4+GutterWid;
  186.       RightInd.Left:=Ruler.ClientWidth-6-trunc((RightIndent+gutterwid)*ruleradj);
  187.       if integer(numbering) = 0 then elenpunt.down := false
  188.          else elenpunt.Down := true;
  189.       gra.Down:= fsbold in richedit1.SelAttributes.Style;
  190.       cor.down:= fsitalic in richedit1.SelAttributes.Style;
  191.       sot.down:= fsunderline in richedit1.SelAttributes.Style;
  192.       bar.down:= fsstrikeout in richedit1.SelAttributes.Style;
  193.       case ord(alignment) of
  194.         0: bsin.down:=true;
  195.         1: bdes.Down:=true;
  196.         2: bcen.Down:=true;
  197.       end;
  198.     finally
  199.     end;
  200. end;
  201.  
  202. procedure TForm1.solotesto;
  203. begin
  204.   if uppercase(extractfileext(sfile)) <> '.RTF' then
  205.     with richedit1.defattributes do
  206.       begin
  207.         richedit1.plaintext:=true;
  208.         name:='Courier New';
  209.         size:=10;
  210.         color:=clBlack;
  211.         style:= [];
  212.       end;
  213. end;
  214. procedure TForm1.FormCreate(Sender: TObject);
  215. begin
  216.   setupruler;
  217.   if paramcount > 0 then
  218.     begin
  219.       sfile:=paramstr(1);
  220.       if uppercase(extractfileext(sfile)) = '.RTF' then
  221.       richedit1.PlainText:=false else
  222.       richedit1.PlainText:=true;
  223.       richedit1.lines.LoadFromFile(sfile);
  224.       solotesto;
  225.       form1.Caption:=(extractfilename(sfile) + ' - ' + versione);
  226.       richedit1.modified:= false;
  227.       salvato:=true;
  228.       richedit1selectionchange(Sender);
  229.     end
  230.   else bnuovoclick(Sender);
  231.   application.onhint:= showhint;
  232.   application.onidle:= IdleLoop;
  233. end;
  234.  
  235. procedure TForm1.bnuovoClick(Sender: TObject);
  236. begin
  237.   if RichEdit1.Modified then
  238.     begin
  239.       mess:= Application.MessageBox('Vuoi salvare le ultime modifiche?', versione, mb_YesNoCancel + mb_iconquestion);
  240.       case mess of
  241.         idYes: bsalvaClick(Self);
  242.         idNo: {Non fa niente};
  243.         idCancel: Abort;
  244.       end;
  245.     end;
  246.   richedit1.lines.clear;
  247.   form1.caption:=(ndoc + ' - '+ versione);
  248.   richedit1.readonly:=false;
  249.   richedit1.plaintext:= false; //modificare questa riga dopo l'implementazione della finestra di opzioni
  250.   with richedit1.defattributes do
  251.     begin
  252.       color:= clBlack;  //modificare questa riga dopo l'implementazione della finestra di opzioni
  253.       name:= 'Times New Roman';  //modificare questa riga dopo l'implementazione della finestra di opzioni
  254.       size:= 11;  //modificare questa riga dopo l'implementazione della finestra di opzioni
  255.       style:= style - [fsBold, fsItalic, fsUnderline, fsStrikeout]; //modificare questa riga dopo l'implementazione della finestra di opzioni
  256.     end;
  257.   firstind.left:= 8;
  258.   leftind.left:= 8;
  259.   rightind.left:= ruler.width-10;
  260.   RichEdit1.Paragraph.FirstIndent := Trunc((FirstInd.Left+5-GutterWid) / RulerAdj);
  261.   RichEdit1.Paragraph.LeftIndent := Trunc((LeftInd.Left+5-GutterWid) / RulerAdj)-RichEdit1.Paragraph.FirstIndent;
  262.   RichEdit1.Paragraph.RightIndent := Trunc((Ruler.ClientWidth-RightInd.Left+4-2) / RulerAdj)-2*GutterWid;
  263.   richedit1.paragraph.alignment:= taLeftJustify;
  264.   form1.RichEdit1SelectionChange(Sender);
  265.   richedit1.paragraph.numbering:= nsNone;
  266.   elenpunt.down:=false;
  267.   richedit1.modified:= false;
  268.   salvato:=false;
  269. end;
  270.  
  271. procedure TForm1.ShowHint(Sender: TObject);
  272. begin
  273.   StatusBar1.panels.items[2].text:= Application.Hint;
  274. end;
  275.  
  276. procedure TForm1.SetEditRect;
  277. var
  278.   R: TRect;
  279. begin
  280.   with RichEdit1 do
  281.   begin
  282.     R := Rect(GutterWid, 0, ClientWidth-GutterWid, ClientHeight);
  283.     SendMessage(Handle, EM_SETRECT, 0, Longint(@R));
  284.   end;
  285. end;
  286.  
  287. procedure TForm1.FormPaint(Sender: TObject);
  288. begin
  289.   seteditrect;
  290. end;
  291.  
  292. procedure TForm1.FormResize(Sender: TObject);
  293. begin
  294.   SetEditRect;
  295.   RichEdit1SelectionChange(Sender);
  296. end;
  297.  
  298. procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
  299. begin
  300.   if RichEdit1.Modified then
  301.     begin
  302.       mess:= Application.MessageBox('Vuoi salvare le ultime modifiche?', versione, mb_YesNoCancel + mb_iconquestion);
  303.       case mess of
  304.         idYes: bsalvaClick(Self);
  305.         idNo: {Niente};
  306.         idCancel: Abort;
  307.       end;
  308.     end;
  309. end;
  310.  
  311. procedure TForm1.IdleLoop(Sender: TObject; var Done: Boolean);
  312. begin
  313. if richedit1.modified then
  314.     begin
  315.       statusbar1.panels.items[1].text:='Modificato';
  316.       salvato:=false;
  317.     end
  318.   else statusbar1.panels.items[1].text:='';
  319.   if salvato then statusbar1.panels.items[0].text:='Salvato'
  320.   else statusbar1.panels.items[0].text:='Non salvato';
  321. end;
  322.  
  323. procedure TForm1.bapriClick(Sender: TObject);
  324. begin
  325.   if opendialog1.execute then
  326.     begin
  327.       bnuovoclick(Sender);
  328.       sfile:=(opendialog1.filename);
  329.       richedit1.lines.loadfromfile(sfile);
  330.       solotesto;
  331.       form1.caption:=(extractfilename(sfile) + ' - ' + versione);
  332.       richedit1.modified:= false;
  333.       richedit1.readonly:= ofreadonly in opendialog1.options;
  334.       salvato:=true;
  335.       richedit1selectionchange(Sender);
  336.     end;
  337. end;
  338.  
  339. procedure TForm1.bsalvaClick(Sender: TObject);
  340. begin
  341.   if richedit1.readonly then
  342.     begin
  343.       mess:= Application.MessageBox('Non posso scrivere su un file di sola lettura, salvare su un altro file', versione, mb_OK + mb_iconexclamation);
  344.       salvaconnome1click(sender);
  345.       exit;
  346.     end;
  347.   if not fileExists(sfile) then
  348.     begin
  349.       salvaconnome1click(sender);
  350.     end
  351.   else
  352.     begin
  353.       if richedit1.plaintext then solotesto;
  354.       richedit1.lines.savetofile(sfile);
  355.       richedit1.modified:= false;
  356.       salvato:=true;
  357.     end;
  358. end;
  359.  
  360. procedure TForm1.Salvaconnome1Click(Sender: TObject);
  361. begin
  362.   if savedialog1.execute then
  363.     begin
  364.       if savedialog1.filterindex = 1 then richedit1.plaintext:=false else richedit1.plaintext:=true;
  365.       richedit1.lines.savetofile(savedialog1.filename);
  366.       sfile:=(savedialog1.filename);
  367.       solotesto;
  368.       form1.caption:=(extractfilename(sfile) + ' - ' + versione);
  369.       richedit1.modified:= false;
  370.       salvato:=true;
  371.     end;
  372. end;
  373.  
  374. procedure TForm1.Stampa1Click(Sender: TObject);
  375. begin
  376.   if printdialog1.execute then
  377.     begin
  378.       if sfile <> ('Nuovo documento') then richedit1.print(extractfilename(sfile))
  379.       else richedit1.print(sfile);
  380.     end;
  381. end;
  382.  
  383. procedure TForm1.bstampaClick(Sender: TObject);
  384. begin
  385.   if sfile <> ndoc then richedit1.print(extractfilename(sfile))
  386.   else richedit1.print(sfile);
  387. end;
  388.  
  389. procedure TForm1.Impostastampante1Click(Sender: TObject);
  390. begin
  391.   printersetupdialog1.execute;
  392. end;
  393.  
  394. procedure TForm1.bcopiaClick(Sender: TObject);
  395. begin
  396.   richedit1.copytoclipboard;
  397. end;
  398.  
  399. procedure TForm1.btagliaClick(Sender: TObject);
  400. begin
  401.   richedit1.cuttoclipboard;
  402. end;
  403.  
  404. procedure TForm1.bincollaClick(Sender: TObject);
  405. begin
  406.   richedit1.pastefromclipboard;
  407. end;
  408.  
  409. procedure TForm1.Selezionatutto1Click(Sender: TObject);
  410. begin
  411.   richedit1.selectall;
  412. end;
  413.  
  414. procedure TForm1.bfontClick(Sender: TObject);
  415. begin
  416. fontdialog1.Font.Name:=richedit1.selattributes.name;
  417. fontdialog1.Font.size:=richedit1.selattributes.size;
  418. fontdialog1.Font.color:=richedit1.selattributes.color;
  419. fontdialog1.Font.style:=richedit1.selattributes.style;
  420.   if fontdialog1.execute then
  421.     begin
  422.       richedit1.selattributes.name:=(fontdialog1.font.name);
  423.       richedit1.selattributes.size:=(fontdialog1.font.size);
  424.       richedit1.selattributes.color:=(fontdialog1.font.color);
  425.       richedit1.selattributes.style:=(fontdialog1.font.style);
  426.     end;
  427.  
  428. end;
  429.  
  430. procedure TForm1.graClick(Sender: TObject);
  431. begin
  432.   if gra.down then richedit1.selattributes.style:= richedit1.selattributes.style + [fsbold]
  433.   else  richedit1.selattributes.style:= richedit1.selattributes.style - [fsbold];
  434.  
  435. end;
  436.  
  437. procedure TForm1.corClick(Sender: TObject);
  438. begin
  439.   if cor.down then richedit1.selattributes.style:= richedit1.selattributes.style + [fsitalic]
  440.   else richedit1.selattributes.style:= richedit1.selattributes.style - [fsitalic];
  441.  
  442. end;
  443.  
  444. procedure TForm1.sotClick(Sender: TObject);
  445. begin
  446.   if sot.down then richedit1.selattributes.style:= richedit1.selattributes.style + [fsunderline]
  447.   else richedit1.selattributes.style:= richedit1.selattributes.style - [fsunderline];
  448.  
  449. end;
  450.  
  451. procedure TForm1.barClick(Sender: TObject);
  452. begin
  453.   if bar.down then richedit1.selattributes.style:= richedit1.selattributes.style + [fsstrikeout]
  454.   else richedit1.selattributes.style:= richedit1.selattributes.style - [fsstrikeout];
  455.  
  456. end;
  457.  
  458. procedure TForm1.elenpuntClick(Sender: TObject);
  459. begin
  460.   RichEdit1.Paragraph.Numbering := TNumberingStyle(elenpunt.Down);
  461. end;
  462.  
  463. procedure TForm1.Allineamento(Sender: TObject);
  464. begin
  465.   RichEdit1.Paragraph.Alignment := TAlignment(TControl(Sender).Tag);
  466.  
  467. end;
  468.  
  469. procedure TForm1.bcolClick(Sender: TObject);
  470. begin
  471.   colordialog1.color := richedit1.SelAttributes.color;
  472.   if colordialog1.execute then richedit1.selattributes.color:=colordialog1.color;
  473.  
  474. end;
  475.  
  476. procedure TForm1.baumClick(Sender: TObject);
  477. begin
  478.   with richedit1.selattributes do
  479.     begin
  480.       if size<72 then size:=size+2;
  481.       SetEditRect;
  482.     end;
  483.  
  484. end;
  485.  
  486. procedure TForm1.bdimClick(Sender: TObject);
  487. begin
  488.   with richedit1.selattributes do
  489.     begin
  490.       if size>5 then size:=size-2;
  491.       SetEditRect;
  492.     end;
  493.  
  494. end;
  495.  
  496. procedure TForm1.rulitmdown(Sender: TObject; Button: TMouseButton;
  497.   Shift: TShiftState; X, Y: Integer);
  498. begin
  499.   FDragOfs := (TLabel(Sender).Width div 2);
  500.   TLabel(Sender).Left := TLabel(Sender).Left+X-FDragOfs;
  501.   FDragging := True;
  502.  
  503. end;
  504.  
  505. procedure TForm1.rulitmmove(Sender: TObject; Shift: TShiftState; X,
  506.   Y: Integer);
  507. begin
  508.   if FDragging then
  509.     TLabel(Sender).Left :=  TLabel(Sender).Left+X-FDragOfs
  510.  
  511. end;
  512.  
  513. procedure TForm1.fstindup(Sender: TObject; Button: TMouseButton;
  514.   Shift: TShiftState; X, Y: Integer);
  515. begin
  516.   FDragging := False;
  517.   RichEdit1.Paragraph.FirstIndent := Trunc((FirstInd.Left+FDragOfs-GutterWid) / RulerAdj);
  518.   Lftindup(Sender, Button, Shift, X, Y);
  519.  
  520. end;
  521.  
  522. procedure TForm1.lftindup(Sender: TObject; Button: TMouseButton;
  523.   Shift: TShiftState; X, Y: Integer);
  524. begin
  525.   FDragging := False;
  526.   RichEdit1.Paragraph.LeftIndent := Trunc((LeftInd.Left+FDragOfs-GutterWid) / RulerAdj)-RichEdit1.Paragraph.FirstIndent;
  527.   RichEdit1SelectionChange(Sender);
  528.  
  529. end;
  530.  
  531. procedure TForm1.rgtindup(Sender: TObject; Button: TMouseButton;
  532.   Shift: TShiftState; X, Y: Integer);
  533. begin
  534.   FDragging := False;
  535.   RichEdit1.Paragraph.RightIndent := Trunc((Ruler.ClientWidth-RightInd.Left+FDragOfs-2) / RulerAdj)-2*GutterWid;
  536.   RichEdit1SelectionChange(Sender);
  537.  
  538. end;
  539.  
  540. procedure TForm1.RulerResize(Sender: TObject);
  541. begin
  542.   RulerLine.Width := Ruler.ClientWidth - (RulerLine.Left*2);
  543.  
  544. end;
  545.  
  546. procedure TForm1.bundoClick(Sender: TObject);
  547. begin
  548.   with RichEdit1 do
  549.     if HandleAllocated then SendMessage(Handle, EM_UNDO, 0, 0);
  550.  
  551. end;
  552.  
  553. procedure TForm1.mrighelloClick(Sender: TObject);
  554. begin
  555.   mrighello.checked:= not mrighello.checked;
  556.   ruler.visible:= not ruler.visible;
  557.  
  558. end;
  559.  
  560. procedure TForm1.mwrapClick(Sender: TObject);
  561. begin
  562.   richedit1.wordwrap:= not richedit1.wordwrap;
  563.   mwrap.checked:= not mwrap.checked;
  564.  
  565. end;
  566.  
  567. procedure TForm1.bemailClick(Sender: TObject);
  568. var
  569.   MapiMessage: TMapiMessage;
  570.   MError: Cardinal;
  571. begin
  572.   with MapiMessage do
  573.     begin
  574.       ulReserved := 0;
  575.       lpszSubject := nil;
  576.       lpszNoteText := PChar(RichEdit1.Lines.Text);
  577.       lpszMessageType := nil;
  578.       lpszDateReceived := nil;
  579.       lpszConversationID := nil;
  580.       flFlags := 0;
  581.       lpOriginator := nil;
  582.       nRecipCount := 0;
  583.       lpRecips := nil;
  584.       nFileCount := 0;
  585.       lpFiles := nil;
  586.     end;
  587.   MError := MapiSendMail(0, 0, MapiMessage,
  588.   MAPI_DIALOG or MAPI_LOGON_UI or MAPI_NEW_SESSION, 0);
  589.   if MError <> 0 then mess:= Application.MessageBox('Si è verificato un errore. Non è stato possibile inviare l''e-mail.', 'SpeedyEdit 2.0', mb_OK + mb_iconexclamation);
  590.  
  591. end;
  592.  
  593. procedure TForm1.Esci1Click(Sender: TObject);
  594. begin
  595.   close;
  596. end;
  597.  
  598. procedure TForm1.binfoClick(Sender: TObject);
  599. begin
  600.   AboutBox.ShowModal;
  601. end;
  602.  
  603. end.