delphi 里面写了个basefm窗体,新建立一个窗口,用代码改动继承自basefm,为什么新窗口产生的时候,没有执行basefm的onCreate事件?basefm里面的OnCreate里面有写MessageBox,但是,新窗口就是没有弹出来
解决方案 »
- 我的机子上怎么找不到serversocker和clientsocker这两个控件呢?(D7)
- NetUserAdd的”log on as a service“的权限问题
- 请问如何生成Popup Menu的二级菜单??急急急急急!!
- delphi关于数据库开发方面的书籍
- 连接数据库,有源码! 在线等
- 请教这样的效果是用了什么控件?多谢。
- NMSMTP控件发EMAIL问题(SMTP服务器需要身份验证)
- Delphi7里新增的Rave Designer是什么用的?
- 紧急求援TdbGrid多行选择问题
- DBCHART控件用法:
- 如何将ORACLE数据库中的表导出
- 散分...【分享贴】EaPopup提示窗口控件(附源码)
---
alt+f12
如下代码:
object Form1: TForm1
Left = 192
Top = 107
Width = 696
Height = 480
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
end改成
inherited Form1: TForm1
end
然后alt+f12
我也改过,还是没有成功,我的form是DLL里面的
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
TFormBase = class(TForm1)
public
constructor Create(AOwner: TComponent); override;
end;
TFormChild = class(TFormBase)
public
constructor Create(AOwner: TComponent); override;
end;var
Form1: TForm1;implementation{$R *.dfm}{ TFormBase }constructor TFormBase.Create(AOwner: TComponent);
begin
inherited;
Application.MessageBox('主', '');
end;{ TFormChild }constructor TFormChild.Create(AOwner: TComponent);
begin
inherited;
Application.MessageBox('子', '');
end;procedure TForm1.Button1Click(Sender: TObject);
var
fc: TFormChild;
begin
fc := TFormChild.Create(nil);
fc.ShowModal;
fc.Free;
end;end.
procedure TfmBase.FormCreate(Sender: TObject);
http://blog.csdn.net/linzhengqun/archive/2005/10/01/493746.aspx
难道不能在主窗体退出时向所有子窗体发送消息么?