📄 unit3.pas
字号:
unit Unit3;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ImgList, ComCtrls, StdCtrls;
type
TForm2 = class(TForm)
Label1: TLabel;
Button1: TButton;
Button2: TButton;
GroupBox1: TGroupBox;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
RadioButton3: TRadioButton;
Button3: TButton;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
uses MainUnit, Unit1, Utils, MDIChld;
{$R *.dfm}
procedure TForm2.Button2Click(Sender: TObject);
begin
Form2.Hide;
MainForm.Open1Click(Sender);
end;
procedure TForm2.Button1Click(Sender: TObject);
var aChild : TMDIChild;
CurrentlyAt : Integer;
begin
Form2.Close;
MainForm.Close1Click(Sender);
ShowWindow(Form1.Handle, SW_SHOW);
aChild := TMDIChild.Create(Application);
MainForm.RTDesigner1.BaseControl:=aChild;
aChild.FileName:='';
MainForm.Save1.Enabled := True;
MainForm.SaveAs1.Enabled := True;
With MainForm Do Begin
Compile1.Enabled := True;
CompileRun1.Enabled := True;
TreeView2.Items.Clear;
TreeView2.Items.Add(TreeView2.TopItem, 'BASIC Project');
TreeView2.Select(TreeView2.Items.ADdChildObjectFirst(TreeView2.Items.AddChild(TreeView2.TopItem, 'Form Designer'), aChild.Caption, TObject(aChild)));
TreeView2.Select(TreeView2.Items.AddChildObject(TreeView2.Items.AddChild(TreeView2.Items[0], 'Code View'), Form1.Tabs.ActivePage.Caption, TObject(Form1.Tabs.ActivePage)));
// TreeView2.Items[1].Selected := True;
ComboBox1.AddItem(aChild.Caption, aChild);
SelectAt(FindString(aChild.Caption));
Properties.Cells[1,0]:= 'None';
Properties.Cells[1,1]:= IntToStr(ActiveMDIChild.Top);
Properties.Cells[1,2]:= IntToStr(ActiveMDIChild.Left);
Properties.Cells[1,3]:= IntToStr(ActiveMDIChild.Height);
Properties.Cells[1,4]:= IntToStr(ActiveMDIChild.Width);
End;
if (RadioButton1.Checked = True) Then
Begin
MainForm.KB1Click(Sender);
Exit;
End;
if (RadioButton2.Checked = True) Then
Begin
MainForm.RQ1Click(Sender);
Exit;
End;
if (RadioButton3.Checked = True) Then
Begin
MainForm.BPP1Click(Sender);
Exit;
End;
//Clear out everything:
For CurrentlyAt := 0 to 255 do
BASICFiles[CurrentlyAt] := '';
ProjectName := '';
FormFiles[0] := '';
end;
procedure TForm2.FormKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if (Key = VK_ESCAPE) Then
Button3Click(Sender);
end;
procedure TForm2.Button3Click(Sender: TObject);
begin
Form2.Close;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -