Switch between forms - cannot understand how to make lazarus / 9-Editor ---------------------------------------------------------------------- Paul-SFL · 2011-09-23 21:20 Hi all . I'm a student, a newbie in Lazarus and OOP - the only thing I learned before is Turbo Pascal. Now I'm working or yearly project, it's a small program that emulates a simple processor and additionally calculates great numbers' sum and difference. The thing is that I'm writing it for Windows - I never did it before . The project consists of two forms, one is the emulator and another is the calculator. I created forms themselves, but stumbled on writing code for a switch between these forms. I googled and looked through different forums, and wrote some piece of code that simply destroys current form and calls another one, but I feel that code is far far from what I need . To perform switch user must click main menu "Navigation" item (caption is "Навигация") and select there another mode (captions are "Эмулятор" and "Калькулятор"). As far as I understand, an algorithm is something like: User selects another mode under Navigation item.Current form is destroyed.The second form appears where the previous one was. I'm not sure it's right.. I would be glad if someone explains me how to implement the switch or tell me where I can find some manual and examples . ---------------------------------------------------------------------- Blaazen · 2011-09-23 21:30 Quote1) User selects another mode under Navigation item. 2) Current form is destroyed. 3) The second form appears where the previous one was. ad 2) I think you don't need destroy current form. Hide is enough. (Form1.Visible:=False;) ad 3) Code: [Select]Form2.Left:=Form1.Left; Form2.Top:=Form1.Top; Form2.Show; ---------------------------------------------------------------------- Paul-SFL · 2011-09-23 21:43 Wow, so simply ! Thank you Blaazen.