AcManForm.pas
资源名称:delphi.rar [点击查看]
上传用户:fh681027
上传日期:2022-07-23
资源大小:1959k
文件大小:2k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit AcManForm;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, ActnMenus, ToolWin, ActnMan, ActnCtrls, ExtActns, StdActns,
- ActnList, ImgList, StdCtrls, ComCtrls, BandActn;
- type
- TForm1 = class(TForm)
- ActionManager1: TActionManager;
- RichEdit1: TRichEdit;
- ImageList1: TImageList;
- EditCut1: TEditCut;
- EditCopy1: TEditCopy;
- EditPaste1: TEditPaste;
- EditSelectAll1: TEditSelectAll;
- EditUndo1: TEditUndo;
- EditDelete1: TEditDelete;
- RichEditBold1: TRichEditBold;
- RichEditItalic1: TRichEditItalic;
- RichEditUnderline1: TRichEditUnderline;
- RichEditStrikeOut1: TRichEditStrikeOut;
- RichEditBullets1: TRichEditBullets;
- RichEditAlignLeft1: TRichEditAlignLeft;
- RichEditAlignRight1: TRichEditAlignRight;
- RichEditAlignCenter1: TRichEditAlignCenter;
- ActionToolBar1: TActionToolBar;
- ActionMainMenuBar1: TActionMainMenuBar;
- ActionToolBar2: TActionToolBar;
- FileOpen1: TFileOpen;
- FileSaveAs1: TFileSaveAs;
- FilePrintSetup1: TFilePrintSetup;
- FileRun1: TFileRun;
- FileExit1: TFileExit;
- SearchFind1: TSearchFind;
- SearchFindNext1: TSearchFindNext;
- SearchReplace1: TSearchReplace;
- SearchFindFirst1: TSearchFindFirst;
- CustomizeActionBars1: TCustomizeActionBars;
- HelpContents1: THelpContents;
- ActionToolBar3: TActionToolBar;
- ActionShowStatus: TAction;
- procedure ActionShowStatusExecute(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form1: TForm1;
- implementation
- {$R *.dfm}
- procedure TForm1.ActionShowStatusExecute(Sender: TObject);
- var
- memStr, memStr2: TMemoryStream;
- begin
- memStr := TMemoryStream.Create;
- try
- memStr2 := TMemoryStream.Create;
- try
- ActionManager1.SaveToStream(memStr);
- memStr.Position := 0;
- ObjectBinaryToText(memStr, memStr2);
- memStr2.Position := 0;
- RichEdit1.Lines.LoadFromStream(memStr2);
- finally
- memStr2.Free;
- end;
- finally
- memStr.Free;
- end;
- end;
- end.