Solved

Unsatisfied forward ... child form

Posted on 2003-11-23
4
212 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 20 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

726 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