Recent

Author Topic: TCustomForm.Show not compatible with Delphi (?)  (Read 10392 times)

Bart

  • Hero Member
  • *****
  • Posts: 5712
    • Bart en Mariska's Webstek
TCustomForm.Show not compatible with Delphi (?)
« on: March 09, 2007, 04:52:31 pm »
In Delphi if I do a Form.Show, the visibility is set to True and the form is explicitely brougth to the front.
So if a form is partially hidden, it'll be visible to the user again.

However Lazarus does not behave like this. If a form is visible, but partially hidden behind other forms, then doing a Form.Show does nothing at all.
I see you can do a Form.ShowOnTop to achieve this, but in my opinion that breaks compatibility with Delphi (and to me the word "show" means that after that I'll see the form in it's full glory...).

However since I'm using Delphi 3, which is rather an oldie, I'm not sure if newer versions of Delphi also do it this way. So I'm asking.
It could also be a well thought design decision by the Lazarus team, of course.

Curious on the how and why.

Bart

RudieD

  • Full Member
  • ***
  • Posts: 234
RE: TCustomForm.Show not compatible with Delphi (?)
« Reply #1 on: March 09, 2007, 07:34:39 pm »
Form1.BringToFront;
The FRED Trainer. (Training FRED with Lazarus/FPC)

RudieD

  • Full Member
  • ***
  • Posts: 234
RE: TCustomForm.Show not compatible with Delphi (?)
« Reply #2 on: March 09, 2007, 07:42:54 pm »
The same as in Delphi. If the form is not hidden, then it will not call the bring to front.
The FRED Trainer. (Training FRED with Lazarus/FPC)

Bart

  • Hero Member
  • *****
  • Posts: 5712
    • Bart en Mariska's Webstek
Re: RE: TCustomForm.Show not compatible with Delphi (?)
« Reply #3 on: March 10, 2007, 01:09:26 pm »
Quote from: "RudieD"
The same as in Delphi. If the form is not hidden, then it will not call the bring to front.

OK, things have changed then since Delpi 3 I guess.
In D3 TCustomForm.Show does an explicit BringToFront.

I had no way to check this, so thanks for the reply.
Better to ask then to report is as a bug when it really isn't.

I'll have to rewrite some Delphi code then too :( , if I'm ever gonna use a newer version of it.

Bart

bee

  • Sr. Member
  • ****
  • Posts: 393
RE: Re: RE: TCustomForm.Show not compatible with Delphi (?)
« Reply #4 on: March 10, 2007, 05:52:32 pm »
Why don't you try Turbo Delphi Explorer? It's a free version of Delphi (2006). I thinks it's more than enough for just checking compatibility between Lazarus and newest Delphi behavior. ;)
-Bee-

A long time pascal lover.

Bart

  • Hero Member
  • *****
  • Posts: 5712
    • Bart en Mariska's Webstek
RE: Re: RE: TCustomForm.Show not compatible with Delphi (?)
« Reply #5 on: March 11, 2007, 12:51:19 pm »
@bee: Yeah, on my 6 year old Celeron 700 MHz, almost senile, computer with the most horrible WinME OS?
As long as my system is stable, I tend to install as little software are possible, to keep it that way.
(I'm a bit of a cheapskate, so unless I win the lottery, or my system breaks down, or I need a better one to run Lazarus, there's not gonna come a new (faster, better, more stable) computer.)
I'm not sure even if it will co-exist with my Delphi 3 Pro version, which is very lean and fast.

Bart

RudieD

  • Full Member
  • ***
  • Posts: 234
RE: Re: RE: TCustomForm.Show not compatible with Delphi (?)
« Reply #6 on: March 13, 2007, 03:56:11 pm »
No, you can only have one version of delphi and Turbo Delphi requires the .net framework.
The FRED Trainer. (Training FRED with Lazarus/FPC)

matthijs

  • Hero Member
  • *****
  • Posts: 537
RE: Re: RE: TCustomForm.Show not compatible with Delphi (?)
« Reply #7 on: March 13, 2007, 05:05:09 pm »
No, you can have several versions of Delphi installed. You can also have Lazarus installed in several versions, next to Delphi. :)
Remember however that the last one to be installed will be started when double clicking on pas-files.
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

 

TinyPortal © 2005-2018