• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 183
  • Last Modified:

Passing params to MDI sheet

When creating an MDI sheet at runtime, how do I pass it parameters which can be used in the OnCreate() event?
0
ChrisGin
Asked:
ChrisGin
1 Solution
 
sperlingCommented:
In your child form source:

type
  TMDIChild = class(TForm)
  .
  .
  public
    constructor CreateWithParams(AOwner : TComponent; AParameter : STRING);
    .
 

constructor TMDIChild.CreateWithParams(AOwner : TComponent; AParameter : STRING);
begin
  inherited Create(AOwner);
  // Do your OnCreate code here instead.
end;

Regards,

Erik.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now