Solved

Unsatisfied forward ... child form

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ddeman not working in activex 3 93
Simple Delphi Question 9 83
Working with hours 3 46
How to define IfThen functions in one common unit? 4 44
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

895 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

14 Experts available now in Live!

Get 1:1 Help Now