I've tested your application. There are many reasons why it is failing but none is IntraWeb's fault.
Seems that you deliberately wanted it to fail because your code is definitely wrong.
Let's start with the project file sampleapp.dpr.
Code:
var
sample : TIWForm1;
begin
// Unit1.TIWForm1.SetAsMainForm;
sample.FormActivate();
// TIWStart.Execute(True);
end.
This is wrong. You just can't remove the IntraWeb application initialization code represented by
IWStart.Execute() method.
This call is not optional, so you can't just comment it out.
More:
you are calling
sample.FormActivate();
But sample is obviously nil, this form instance hasn't been created and hasn't been assigned to sample variable. This will obviously raise an AV.
I'm not even considering that you are declaring a global var (sample) as TIWForm1. Global vars are a no-no in multithreaded applications, including IntraWeb. This kind of thing is a recipe for errors that will only happen when you have multiple users. In short: Don't use global vars.
Moving to your IWForm1:
Code:
var
frmVerifyCust: TfrmVerifyCust;
frmP: TfrmPlanBalanceInqVerifyCust;
implementation
{$R *.dfm}
procedure TIWForm1.FormActivate;
begin
Run;
end;
procedure TIWForm1.Run;
begin
try
frmVerifyCust:= TfrmVerifyCust.Create(Nil);
finally
frmVerifyCust.Free; {always free object}
end;
//two forms that fail...
try
frmP:= TfrmPlanBalanceInqVerifyCust.Create(Nil);
finally
frmP.Free; {always free object}
end;
end;
Again you are using global vars when creating instance of other forms. This is wrong. Use local vars or no var at all (you don't need a variable to create a form).
Also, IW forms must be owned by TIWApplication instance. You must create them as:
TfrmVerifyCust.Create(WebApplication);
WebApplication (TIWApplication object) contains better methods to create and show IWForms, for instance:
WebApplication.ShowForm(TIWForm1);'
And finally:
Code:
procedure TIWForm1.FormActivate;
begin
Run;
end;
You created a publish method FormActivate() but you are calling it without first creating the TIWForm1 instance (from the DPR file). This is wrong.
I don't know why you created such strange code... IntraWeb applications have many similarities with a normal VCL Forms application, but they are *very* different and the way you create and deal with IWForms is not the same as you create VCL Forms.
I strongly suggest that you pick one of our demos and start from it.
This demo, although a little older, shows many important concepts:
https://github.com/Atozed/IntraWeb/tree/...i/Features