Recent

Author Topic: How to create two forms in an application?  (Read 4723 times)

Peiman

  • New Member
  • *
  • Posts: 41
How to create two forms in an application?
« on: October 15, 2009, 10:46:21 am »
Hi!
In delphi it was very easy to create two forms, one as the main form. But in lazarus, it raises the exception "EClassNotFound" . What is the problem?

LazaruX

  • Hero Member
  • *****
  • Posts: 597
  • Lazarus original cheetah.The cheetah doesn't cheat
Re: How to create two forms in an application?
« Reply #1 on: October 15, 2009, 12:06:03 pm »
Uhm strange. I do it like this:

Create a new project
Save it as:

project1
unit1.pas

Create another form and save it as unit2.pas
In unit1.pas in the uses write unit2
On Form1, place a button and double click on it.
Write then
Code: [Select]
form2.show;

That works for me.

gajahbengkak

  • New Member
  • *
  • Posts: 13
  • this is me, mine, myself
    • Catatan Si Arief
Re: How to create two forms in an application?
« Reply #2 on: November 19, 2009, 03:58:23 am »
Select File -> New Form then save it.

TurboRascal

  • Hero Member
  • *****
  • Posts: 672
  • "Good sysadmin. Bad programmer."™
Re: How to create two forms in an application?
« Reply #3 on: November 29, 2009, 01:45:56 pm »
Peiman, is it possible that your Lazarus installation is damaged? Try recompiling Lazarus, if that fails, reinstall...
Regards, ArNy the Turbo Rascal
-
"The secret is to give them what they need, not what they want." - Scotty, STTNG:Relics

 

TinyPortal © 2005-2018