[Lazarus] Application GUI does not appear

2022-12-26 Thread Koenraad Lelong via lazarus

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
--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Application GUI does not appear

2022-12-26 Thread Michael Van Canneyt via lazarus




On Mon, 26 Dec 2022, Koenraad Lelong via lazarus wrote:


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.
--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Application GUI does not appear (solved)

2022-12-26 Thread Koenraad Lelong via lazarus

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



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.





--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus