Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit Unit1;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls, ExtCtrls;
- type
- TForm1 = class(TForm)
- Edit1: TEdit;
- Edit2: TEdit;
- Memo1: TMemo;
- Label1: TLabel;
- Label2: TLabel;
- Label3: TLabel;
- Button1: TButton;
- Button2: TButton;
- Image1: TImage;
- procedure Button1Click(Sender: TObject);
- procedure Button2Click(Sender: TObject);
- procedure Memo1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form1: TForm1;
- implementation
- {$R *.dfm}
- //Botão que une as palavras
- procedure TForm1.Button1Click(Sender: TObject);
- var
- Linha: string;
- Posicao: byte;
- begin
- for Posicao:=0 to Memo1.Lines.Capacity do
- begin
- Linha := Self.Memo1.Lines.Strings[Posicao];
- Linha := Edit1.Text+Linha+Edit2.Text;
- Self.Memo1.Lines.Strings[Posicao]:=Linha;
- end;
- end;
- //Botão que seleciona e copia para o clipboard
- procedure TForm1.Button2Click(Sender: TObject);
- begin
- Memo1.SelectAll;
- Memo1.CopyToClipboard;
- Memo1.SelStart:=0;
- Memo1.SelLength:=Length(Memo1.Text);
- end;
- //Funcionar CTRL+A que seleciona tudo no memo (frescurebs)
- procedure TForm1.Memo1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
- begin
- if (Key=Ord('A')) and (ssCtrl in Shift) then
- begin
- TMemo(Sender).SelectAll;
- Key:=0;
- end;
- end;
- //Coded by SuPrEm3 (Daniel/Nerd)
- //Conhecimento não é crime, compartilhe!
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement