?
Solved

Unsatisfied forward ... child form

Posted on 2003-11-23
4
Medium Priority
?
216 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 5

Accepted Solution

by:
Darth_helge earned 80 total points
ID: 9806050
change your

function Start : Boolean;

to

function TFrmForm.Start : Boolean;


0
 
LVL 5

Expert Comment

by:Darth_helge
ID: 9806054
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month12 days, 19 hours left to enroll

777 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