3.23.2013 How to Make Lazarus run in a Single Window

This tutorial shows you how to make lazarus run with just one window. It is a good docking solution which will be integrated in Lazarus in future, when it becomes stable.

Lazarus is a good piece of software. It can create cross platform applications, no sweat! It can also convert Delphi projects and help them run on Mac and Linux machines. But let's face it, it has windows running on over the screen. It is sometimes difficult to manage all the cluttered windows and do the actual coding. In this scenerio, you might choose to use single window interface. And the good news is, there is a way to turn those messy windows into a disciplined interface.

Take a look at how Lazarus looks normally:

A development environment, or a random collection of windows?!

We will use KZDesktop package to make lazarus run in a single window. Please keep in mind that it is in a beta state. It may work properly as expected. So if you want to keep it safe, do not use it. (But I am using it and have not yet faced any crash.)

If you want a stable solution, then choose Anchor Docking. It is available with the default installation of Lazarus. ( EDIT: When I wrote this article I didn't know much about Anchor Docking. Now that know I have added instructions on how to use it...) We'll see the Anchor Docking solution too, at the end. 

I heard that when it is going to become stable, it would be added to Lazarus as a feature. Here's how you can enjoy Lazarus in a single window:

1.Download KZDesktop

Go here to download the package:
or here for a direct link: http://sourceforge.net/projects/kzdesktop/files/?source=navbar

Extract the downloaded package in C:\lazarus\components (Assuming that you have installed Lazarus in C:\lazarus directory)

2.Prepare Lazarus

Start Lazarus.

Then go to Package -> Open package file (.lpk)

Then Open the C:\lazarus\components\kzdesktop_beta01\kzdesktop_ide.lpk

Click compile. It will take some time to compile.

Click Use -> Install. Press yes on a messagebox that appears. It will rebuild the whole Lazarus IDE. It is very interesting as Lazarus will re-create Lazarus itself! After rebuilding, Lazarus will restart.

3.Use KZDesktop

Click Tools -> KZ Desktop-Start. Press OK.

Then Click File -> Restart and voila! It is in single window!

Now look at your Lazarus with proud as it puts the windows, where they belong! ... In a single window!!

Lazarus running in a single window screenshot

Disabling KZDesktop

If you have any problem with KZDesktop or just don't like it, then you can disable it.

Click Tools -> KZDesktop - Stop.
Press OK.
Click File -> Restart.

Anchor Docking Way...

Anchor docking is available in your lazarus installation directory by default. So it is a more stable solution than kzDesktop. Simple instruction to install it:
1. Double click c:\lazarus\components\anchordocking\design\anchordockingdsgn.lpk
2. It will start lazarus with an extra package window. Click Compile on it. After the compilation, click Use->Install.
3. You will be prompted anchordocking package will be installed as well, click OK. Another message would ask would you like to rebuild Lazarus, click Yes.

Lazarus will be restarted after the installation and you will see the windows docked. If you see any window undocked, then drag its titlebar and drop over the docked windows to dock it. Then Click Tools -> Save layout to save the layout. (Otherwise the layout will not be saved for the next time.)

Here is a screenshot of the single window Lazarus made possible with Anchor Docking:

Not bad, right? To some extent, I like it better than kzDesktop. Especially it doesn't mess up the Alt+Tab behavior. And the form designer is not docked in such a way that I have to use arrows to scroll it. Somehow it feels more natural to me. ( It's just my opinion. )

To uninstall Anchor Docking then click Package -> Install/Uninstall Package. Then select anchordockingdsgn and click Uninstall Selected.


In this article we learned about 2 solutions for making Lazarus as single window. kzDesktop is in beta, so it makes it less reliable. But if you are strictly looking for a single window solution, even with the form designer, then kzDesktop is your solution. Beta 2 of kzDesktop has a better scrolling of the form by dragging a rectangle view area and not with some arrow buttons.

If you are looking for a stable, reliable option, go for Anchor Docking.

If you are still unsure, then try both of them then choose the best one that suits your needs.


Carmelo Privitera said...

i like yur post but i have this error message:
"make.exe[1]: *** [idepkg] Error 255"

Can u help me?

Adnan Shameem said...


Thanks for reading my post.

For the problem you mentioned, I googled your message and it seems that it is the problem of make.exe in the newer versions of FPC (2.6.x). Try to download this make.exe and (re)place it in the C:\lazarus\fpc\2.6.x\bin\i386-win32 directory. Then try again with the installation process.

You can also google it to learn more.

Good luck! :)

Carmelo Privitera said...

Tanks! i solved it ;)

Jørn Erik said...

It really makes Lazarus a lot nicer :)

DamnedBoy29m said...

A newbie and couldnt managed to install kzdesktop with codetyphoon.. can you please help me? :(

Adnan Shameem said...

Well, I have never used Codetyphon.

But with a bit of googling I have found a thread. According to this forum thread Codetyphon doesn't support using kzdesktop. They rather are developing pl_GlassDocking for CT.

According to this thread in lazarus forum the 2.50 version has built in capability to use pl_GlassDocking in CT. I think you should try that out.

Good luck.

Diane said...

I tried to compile KZDesktop for lazarus 1.2.2 and after I changes 'Items' to 'Comps' (3 times in in kzlazdesktop.pas). Tip was from here
It works fine.

Adnan Shameem said...


Yes, I've heard that kzDesktop does not compile on Lazarus 1.2.

Although I prefer Anchordock. It's way more customizable, feels more snappy and well integrated. But I like the docked form designer in kzDesktop.


Tatiana said...

Hello, thanks for your post. I am brand new to Lazarus and cannot stand the disconnected windows. I want to use Anchordock, however, could you please tell me what "use" button you are talking about when you say to press Use > Install? I have Lazarus 1.6.4 and cannot find any button called 'Use.'

I'm sure this is an obvious question, but like I said, I don't yet know what I am doing with this program. Thanks.

Copyright 2013 LazPlanet
Carbon 12 Blogger template by Blogger Bits. Supported by Bloggermint