Recent

Author Topic: Porting from Delphi: some problems  (Read 6052 times)

firefox88

  • Newbie
  • Posts: 3
Porting from Delphi: some problems
« on: June 20, 2006, 07:55:36 pm »
I've ported a project from Borland Delphi.

I've replaced the "wrong" function and components, and all seemed to be OK. Then I discovered that, every time I open the project, the size of the main form is reset to 320x240 pixels; position top 0, left 0. Editing and saving the form is useless: other changes do apply, size does not.

Moreover, every time I launch the executable a black console-like window opens under program's interfaces.

Runnung Microsoft Windows, and Lazarus + Freepascal latest stable versions.

Any clue?

Thank you!  :D

P.S.: Sorry, I've posted in the wrong section. :roll:

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
RE: Porting from Delphi: some problems
« Reply #1 on: June 20, 2006, 09:29:16 pm »
About the console windows, open the project (the .lpi file), go to the menu Project --> Compiler Options

Next open the Tab "Linking" and make sure to mark the "Win32 GUI Application" option

About the form, that´s odd. Try to open the lfm file and edit that value manually. Also try to chech the permissions on this file.

firefox88

  • Newbie
  • Posts: 3
Re: RE: Porting from Delphi: some problems
« Reply #2 on: June 20, 2006, 10:06:48 pm »
Quote from: "sekel"
About the console windows, open the project (the .lpi file), go to the menu Project --> Compiler Options
Next open the Tab "Linking" and make sure to mark the "Win32 GUI Application" option

It worked. Thank you  :D


Quote from: "sekel"
About the form, that´s odd. Try to open the lfm file and edit that value manually. Also try to chech the permissions on this file.

I opened the .lfm file with an external text editor. I changed Height, Width, ClientHeight, ClientWidth. When I opened the project, Lazarus reset all to the default values... I manually resized the form, then I closed and saved the project; then I opened the .lfm with a text editor: 320x240. No way to change it... Permissions are OK.

Thanks!

RudieD

  • Full Member
  • ***
  • Posts: 234
RE: Re: RE: Porting from Delphi: some problems
« Reply #3 on: June 21, 2006, 06:08:47 pm »
Did you check your Form.Position <> poDefaultSizeOnly ?
The FRED Trainer. (Training FRED with Lazarus/FPC)

firefox88

  • Newbie
  • Posts: 3
Re: RE: Re: RE: Porting from Delphi: some problems
« Reply #4 on: June 21, 2006, 07:01:26 pm »
Quote from: "RudieD"
Did you check your Form.Position <> poDefaultSizeOnly ?


I checked it...  :(

pfranchuk

  • New Member
  • *
  • Posts: 19
Re: RE: Re: RE: Porting from Delphi: some problems
« Reply #5 on: July 01, 2006, 03:02:09 am »
Quote from: "firefox88"
Quote from: "RudieD"
Did you check your Form.Position <> poDefaultSizeOnly ?


I checked it...  :(


I ran across the same problem with one app that worked fine under 9.14, but exhibited the form display that you see under 9.16. It is the only one of many projects written in previous releases. All the others did not do this.

It turns out that the difference I found in this project is that the mainform has an Icon assigned. The others do not. Could this be your problem as well? Resizing and placing the form correctly will create a compiled version with the form in the right size. But it is a real pain, since the form needs to be just rignt in size for all the components to look correct.

I have not dared to try and update my working install of 9.14 on Linux to see where this problem might be.

Peter

Anonymous

  • Guest
RE: Re: RE: Re: RE: Porting from Delphi: some problems
« Reply #6 on: July 01, 2006, 12:48:53 pm »
Unable to solve the problem.

Thank you, however...