Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Forms not starting maximized

232 views
Skip to first unread message

Ian Boyd

unread,
Apr 2, 2008, 4:39:15 PM4/2/08
to
i know the bug has been around since Delphi 1. But after 11 years it's
really starting to get on my nerves.

http://groups.google.com/group/borland.public.delphi.ide.general/browse_thread/thread/87cb878294a103f9/b7c55a35266cfc2c
http://groups.google.com/group/borland.public.delphi.vcl.components.using/browse_thread/thread/fd602b99f3f12b12/bcf2c8f1ac40c2ee

i know nobody ever figured out the problem, but has anybody figured out the
problem?


Dave Nottage [TeamB]

unread,
Apr 2, 2008, 11:20:43 PM4/2/08
to
Ian Boyd wrote:

Is there a definitive (minimal) sample project that demonstrates the
problem? I'm having trouble reproducing it.

--
Dave Nottage [TeamB]

Ian Boyd

unread,
Apr 3, 2008, 9:13:21 AM4/3/08
to
> Is there a definitive (minimal) sample project that demonstrates the
> problem? I'm having trouble reproducing it.

Yes! Reproducable on any Delphi 5 machine.


1. Create a new app and a form.
2. Set the form to maximized (WindowState = wsMaximized) at design time.
2. Drop a TLabel and a TEdit
3. OnEnter of the edit box, bold the label:
procedure TForm1.Edit1Enter(Sender: TObject);
begin
Label1.Font.Style := Label1.Font.Style + [fsBold];
end;
4. Set the form's AutoScroll property to false (AutoScroll = False) at
design time.

Run it.

There are two kinds of ways that the maximized state fails. One is fixed by
not setting your form to Posotion = poScreenCenter. This is not
demonstrating that failure mode - since our form is not poScreenCenter.

Either way, it's a bug in Delphi.


Ian Boyd

unread,
Apr 3, 2008, 9:18:01 AM4/3/08
to
> Is there a definitive (minimal) sample project that demonstrates the
> problem? I'm having trouble reproducing it.

Here are the steps for the other maximized failure mode:

1. Create an new application with a form
2. Set the form's WindowState to wsMaximized
3. Set the form's Position to poScreenCenter

Run it!

Ian Boyd

unread,
Apr 3, 2008, 9:36:52 AM4/3/08
to
> 1. Create a new app and a form.
> 2. Set the form to maximized (WindowState = wsMaximized) at design time.
> 2. Drop a TLabel and a TEdit
> 3. OnEnter of the edit box, bold the label:
> procedure TForm1.Edit1Enter(Sender: TObject);
> begin
> Label1.Font.Style := Label1.Font.Style + [fsBold];
> end;
> 4. Set the form's AutoScroll property to false (AutoScroll = False) at
> design time.
>
> Run it.

Fails in Delphi 5.

Also tested and fails in Delphi 7 and BDS2006.


Dave Nottage [TeamB]

unread,
Apr 3, 2008, 6:02:12 PM4/3/08
to
Ian Boyd wrote:

> Also tested and fails in Delphi 7 and BDS2006.

This one fails in RAD Studio 2007, too.

Thanks for that.. I'm looking into it.

--
Dave Nottage [TeamB]

Dave Nottage [TeamB]

unread,
Apr 3, 2008, 5:59:45 PM4/3/08
to
Ian Boyd wrote:

> Here are the steps for the other maximized failure mode:
>
> 1. Create an new application with a form
> 2. Set the form's WindowState to wsMaximized
> 3. Set the form's Position to poScreenCenter
>
> Run it!

It doesn't happen for me in RAD Studio 2007, so perhaps it has either
been fixed, or there's some other conditions that I'm not aware of.

I'm using XP, btw.

--
Dave Nottage [TeamB]

Ian Boyd

unread,
Apr 4, 2008, 9:19:31 AM4/4/08
to

"Dave Nottage [TeamB]" <david...@radsoft.com.au> wrote in message
news:47f55351$1...@newsgroups.borland.com...

> Ian Boyd wrote:
>
>> Here are the steps for the other maximized failure mode:
>>
>> 1. Create an new application with a form
>> 2. Set the form's WindowState to wsMaximized
>> 3. Set the form's Position to poScreenCenter
>>
>> Run it!
>
> It doesn't happen for me in RAD Studio 2007, so perhaps it has either
> been fixed, or there's some other conditions that I'm not aware of.

This one was fixed by Delphi 7. That's why i only mentioned it on the other
spot :)

The dfm and pas text in my old post:
http://groups.google.com:80/group/borland.public.delphi.ide.general/browse_thread/thread/87cb878294a103f9/b7c55a35266cfc2c

also fails. It fails if the scrollbox is not scrolled to the top at design
time. i can't trim it down more than the two dozen controls because it's
very touchy. But if you use that exact dfm (with all the tops, lefts,
positions, etc) then it also fails.


Ian Boyd

unread,
Apr 9, 2008, 1:52:04 PM4/9/08
to
Form Not Starting Maximized - Example#4
=============================
This is my forth set of minimal, reproducable examples of how to make a form
not start maximzed.

1. Create a new app and a form.
2. Set the form to maximized (WindowState = wsMaximized) at design time.

3. Drop a ListView control on the form
4. During OnShow, add 20 empty items to the list view:
procedure TForm1.FormShow(Sender: TObject);
var
i: Integer;
begin
for i := 1 to 20 do
ListView1.Items.Add;
end;
5. Set the form's AutoScroll property to false (AutoScroll = False) at
design time

Run it!

Tested in Delphi 5.

The first 3 demo's were already posted to .Attachments, this is demo number
4.


Ian Boyd

unread,
May 1, 2008, 11:20:45 AM5/1/08
to
Any insights?

"Dave Nottage [TeamB]" <david...@radsoft.com.au> wrote in message

news:47f553e4$1...@newsgroups.borland.com...

0 new messages