Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2022-12

Application GUI does not appear

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Koenraad Lelong

Hi,
It's been a while since I did some development with Lazarus. Now I wanted to update an application I wrote some years ago. At that time the application was written and compiled on and for Linux. Now I want that application to run on Windows 11 64bit. I installed the latest Lazarus (2.2.4 64bit) on a Windows 11 machine and copied my sources to that machine.
After some struggling with a missing library (libmysql.dll) I managed to run the original application. But I could not see the GUI. Then I discovered I could not modify the forms, I simply can't see them. Pressing F12 does nothing but greying out the caption of the editor. I can see the form of the datamodule though.
I used the "Check LFM-file in editor"-tool and that checks OK for the GUI-forms.
I added an msgDialog in the on-show routine of the main form and that does show. But when I click that away, nothing shows anymore, just the icon in the task-bar.

I created a minimal application and that does work fine.

Any Ideas what is happening ?

Thanks,
Koenraad

Reply by email

Michael Van Canneyt
to Koenraad Lelong
Koenraad Lelong wrote 21 lines
Hi, It's been a while since I did some development with Lazarus. Now I wanted to update an application I wrote some years ago. At that time the application was written and compiled on and for Linux. Now I want that application to run on Windows 11 64bit. I installed the latest Lazarus (2.2.4 64bit) on a Windows 11 machine and copied my sources to that machine. After some struggling with a missing library (libmysql.dll) I managed to run the original application. But I could not see the GUI. Then I discovered I could not modify the forms, I simply can't see them. Pressing F12 does nothing but greying out the caption of the editor. I can see the form of the datamodule though. I used the "Check LFM-file in editor"-tool and that checks OK for the GUI-forms. I added an msgDialog in the on-show routine of the main form and that does show. But when I click that away, nothing shows anymore, just the icon in the task-bar. I created a minimal application and that does work fine. Any Ideas what is happening ?

It could be that the support for High-DPI is messing with your forms. If the messagedialog works, it shows that the form is loaded and being shown. Probably it has size zero.

So maybe check the form sizes in the lfm file, also check whether a LCLVersion is being streamed. If so, maybe change its value to 2.2.4.0.

Michael.

Reply by email

Koenraad Lelong
to Michael Van Canneyt

Op 26/12/2022 om 16:09 schreef Michael Van Canneyt:

Show quoted text 10 lines
It could be that the support for High-DPI is messing with your forms. If the messagedialog works, it shows that the form is loaded and being shown. Probably it has size zero. So maybe check the form sizes in the lfm file, also check whether a LCLVersion is being streamed. If so, maybe change its value to 2.2.4.0. Michael.

Hi Michael,

The application is intended to run on a small screen (i.e. 1280x1024). But I developed the application on a wide screen, so the forms were not visible on the small screen of the Windows PC. Your suggestion to look at the lfm solved the problem of not being able to edit/see the forms. The problem when the application runs was similar. I store the place and size of the forms in an ini-file (iniPropStorage). And I copied that ini-file from my development machine to the windows machine. Once I modified that ini-file I was able to see the GUI.

Thanks,

Koenraad.

Reply by email