Atozed Forums
Open other Page - Printable Version

+- Atozed Forums (
+-- Forum: Atozed Software Products (
+--- Forum: IntraWeb (
+---- Forum: English (
+----- Forum: IntraWeb General Discussion (
+----- Thread: Open other Page (/thread-2074.html)

Open other Page - DL4NSC - 10-21-2020

Hi Guys
I have some little problem

I have two forms on my test application. But I can not open the second form.
I have create a button. On click this button

Form3->Show(); not work
IWForm3->Show(); not work
TIWForm3->Show(); not work....

Can you helb me?  I work with c++Builder.


RE: Open other Page - kudzu - 10-21-2020

1) "I can not open the second form." is not very descriptive. What exactly happens when you try these?

2) Have you looked at the demos? While C++ has a slightly different syntax, the steps to do so are the same as Delphi.

3) What is Form3? I assume a variable? Have you created an instance?

RE: Open other Page - DL4NSC - 10-23-2020

Hello kudzu

Yes, I watched the demos.
In the Delphi introduction there is a second page with

TIWForm2.Create (WebApplication) .Show;

opened and displayed.
I have Unit1 and Unit2 with TIWForm1 and TIWForm2 respectively

I integrated Unit2 into Unit1. But none of the spellings lead to any result.

Here is the code
// ------------------------------------------------ ---------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#include "Unit2.h"
#include "UserSessionUnit.h"
// ------------------------------------------------ ---------------------------
#pragma package (smart_init)
#pragma link "uLoginDlg"
#pragma link "uSecControl"
#pragma link "IWCompGradButton"
#pragma resource "* .dfm"
// ------------------------------------------------ ---------------------------
__fastcall TIWForm1 :: TIWForm1 (TComponent * Owner)
: TIWAppForm (Owner)
// ------------------------------------------------ ---------------------------
void setAsMainForm () {
TIWForm1 :: SetAsMainForm ();
#pragma startup setAsMainForm

void __fastcall TIWForm1 :: IWGradButton1Click (TObject * Sender)
TIWForm1-> Show ();
// ------------------------------------------------ ---------------------------

RE: Open other Page - DL4NSC - 10-24-2020

When I say the expression

WebApplication-> ShowForm (TIWForm2);

comes the following error message:

[bcc32 error] Unit1.cpp (51): E2108 Invalid use of typedef 'TIWForm2'
Full parser context
Unit1.cpp (33): Analysis: void _fastcall TIWForm1 :: IWGradButton1Click (TObject *)

The form I want to call is called TIWForm2 and is in Unit2.
Unit2 is included via an include.

What can I do?

RE: Open other Page - kudzu - 10-27-2020

TIWForm1-> Show ();

This will never work. TIWForm1 is the class. You need to create an instance of that class and call Show on the instance.

TIWForm2.Create (WebApplication) .Show;

This contains a constructor. In Delphi the constructor is the Create.