5,283
社区成员




MainForm 是 MDI 主窗体;Manager 与 GraphicWindow 都是 Child 子窗体。
加入括号 { } 内的这段代码,就报错,很奇怪,,,
没有这段代码的话,一切正常,,,
procedure TMainForm.FormResize(Sender: TObject);
begin
if Manager = Nil then Manager:= TManager.Create(Self);
Manager.Show;
{ if GraphicWindow = Nil then GraphicWindow:= TGraphicWindow.Create(Self);
GraphicWindow.Show; } 只要插入{}这段代码,就报错,,,
Manager.Width:= MainForm.Width div 5;
Manager.Height:= MainForm.Height - 120;
Manager.Left:= 0;
Manager.Top:= 0;
end;
小coder,看来你还是油梭子发白呀~
我们这种不是计算机专业的,跟不上这么快的技术更新速度。
----- delphi VB 就能解决所有问题,,主要是计算,,界面当然也很重要,但是需求不是那么迫切 (^o^)/~
还在用delphi啊推荐c#做窗体与delphi一脉相承而且vs好用的多号称IDE天花板
TGraphicWindow创建或显示时本来就有错误。
你这个错误,通常是什么类没有创建就想去使用,或者说已经释放了你还想使用。
你单独执行:
if GraphicWindow = Nil then GraphicWindow:= TGraphicWindow.Create(Self);
GraphicWindow.Show;
会不会报错??
初步估计是你GraphicWindow里有问题,与是不是 Child 子窗体以及是不是两个窗体无关。
用Delphi 10.3.3测试了一下, 没有报错