Forms loosing focus with formStyle = bsSingle lazarus / 31-LCL ---------------------------------------------------------------------- boznz · 2015-10-09 18:59 Hi First and foremost, this is the best free software I have worked with, ever  I am currently writing a large factory production system with Lazarus and MySQL and Win32. It is currently 70+ forms and growing (screenshot attached). I have done previous big systems with Delphi XE2 and found the transition almost seemelss to become productive, I now prefer lazarus over delphi and glad I made the switch. just the fact I can right-click and get every declaration of every unit alone is amazing! One annoyance I did have was I was having problems with child forms loosing focus when you click away from the application. When you returned to the application the main form would show but the child form remained hidden until the form was clicked on. It has been driving me and the client nuts on an otherwise flawless looking program. I had tried every combination of popupparent, dabbled with the other widgetset settings (compiled but nothing shows!) and just assumed it was because I was embedding forms. The bottom line is I had been setting a lot of forms to formstyle=bssingle, changing them to bsSizeable or bddialog has completely fixed the problem. Hopefully it will help someone else. Note: the program will eventually become open source and I will put it up on my website at rodyne.com in the next month or so. Another $$ donation on its way to just say keep up the good work.. ---------------------------------------------------------------------- balazsszekely · 2015-10-09 19:13 You should make a small demo project where the issue is reproducible. Please also specify lazarus/fpc version and your OS. ---------------------------------------------------------------------- Handoko · 2015-10-09 19:25 Welcome boznz. I have no experience about your issue, but I recently heard some discussions that I think might be helpful: http://forum.lazarus.freepascal.org/index.php/topic,29822.0.html http://forum.lazarus.freepascal.org/index.php/topic,29764.0.html ---------------------------------------------------------------------- boznz · 2015-10-10 08:49 Thanks for the responses guys No issue now, my work-around has fixed the problem for me and I hope will help someone else possibly having similar issues. I am compiling on Lazarus 1.4.0 running under Window 7 using the default win32 widgetset. The project has a main form with menus on the left and embeds different child forms in a panel on the right when an option is clicked. The main form is called by the splash form on start and the embedded forms then call other child forms etc which have the problem. This is my preferred way to build complex programs so I needed it to all work if I was to migrate from delphi, and it does Time is my enemy at the moment so no demo program for now,  I will simply avoid formstyle=fssingle for the rest of this project. I will publish the whole project source code and documentation on my web site (rodyne.com) in a month or two and I will come back and review this problem then with the latest compiler. If it is still reproducible I will try and dig deeper for a fix and let you know the outcome and the code to reproduce it. Cheers Boz