Solved

Unsatisfied forward ... child form

Posted on 2003-11-23
4
208 Views
Last Modified: 2010-05-18
Hi,

I am a beginner at this: I'm testing the showmodal functions with Delphi 6.0 . I keep getting an error:"Unsatisfied forward or extarnal decleration: 'TfrmFormopen.Start' "...

I've tried to change the function call in the public declarations, but still no improvements.What am I doing wrong?

Code:
unit untFormopen;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TfrmFormopen = class(TForm)
    Label1: TLabel;
    btnClose: TButton;
    btnOk: TButton;
    edtTekst: TEdit;
    procedure btnCloseClick(Sender: TObject);
    procedure btnOkClick(Sender: TObject);
  private
    { Private declarations }
  public
 {Public declarations}
 function Start : Boolean;
 end;
var
  frmFormopen: TfrmFormopen;

implementation

{$R *.dfm}

function Start : Boolean;
begin
Showmessage ('Finally accomplished');
frmFormopen.edtTekst.Clear;
Result := frmFormopen.ShowModal = mrOK;
end;

procedure TfrmFormopen.btnCloseClick(Sender: TObject);
begin
Modalresult := MrCancel;
end;

procedure TfrmFormopen.btnOkClick(Sender: TObject);
begin
Modalresult := MrOk;
end;

end.
0
Comment
Question by:And1j
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
Darth_helge earned 20 total points
Comment Utility
change your

function Start : Boolean;

to

function TFrmForm.Start : Boolean;


0
 
LVL 5

Expert Comment

by:Darth_helge
Comment Utility
nb!

don't change it at the declaration. the unit should look like this.

unit untFormopen;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TfrmFormopen = class(TForm)
    Label1: TLabel;
    btnClose: TButton;
    btnOk: TButton;
    edtTekst: TEdit;
    procedure btnCloseClick(Sender: TObject);
    procedure btnOkClick(Sender: TObject);
  private
    { Private declarations }
  public
 {Public declarations}
 function Start : Boolean;
 end;
var
  frmFormopen: TfrmFormopen;

implementation

{$R *.dfm}

function TFrmForm.Start : Boolean;
begin
Showmessage ('Finally accomplished');
frmFormopen.edtTekst.Clear;
Result := frmFormopen.ShowModal = mrOK;
end;

procedure TfrmFormopen.btnCloseClick(Sender: TObject);
begin
Modalresult := MrCancel;
end;

procedure TfrmFormopen.btnOkClick(Sender: TObject);
begin
Modalresult := MrOk;
end;

end.


0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now