Board index » delphi » Windowmenu fails to populate after update to D5

Windowmenu fails to populate after update to D5

I have an MDI application that is using a Window menu to switch
between existing child windows. This application was developed using
Delphi 4 and all was well. THen I updated my development environment
to Delphi 5 and now I discover that the Window menu does not populate
with the names of the child windows anymore. So the only way to switch
windows now is to reduce the window size from max and then search for
the windows in the mess that appears. Not god :-(

What happened and what can I do to solve this problem? I have looked
at the WindowMenu property of the main form and it displays the
correct menu name. What else can I do?

/Bo

 

Re:Windowmenu fails to populate after update to D5


Hi Bo,

some more questions to clear it up:

Do you define the menu items at design time or at run time? If at run
time: on which occasion do you add the items (at OnActivate or OnShow of
the main form, or...)?

It may also have something to do with the order of creation of the MDI
windows in relation to the creation time of the main menu. Where do you
derive the menu entries from? Maybe something got mixed up while
migrating from D4 to D5. When do you create the MDI forms?

Btw., I once had a strange behavior in D3 when I lost all my OnActivate
activities after resizing my main form at design time so that
(unintentionally) scroll bars appeared. The OnActivate was still defined
and still had a reference to the source code, but when executed, the
program simply didn't jump into the OnActivate-procedures. I never got
that fixed (hat to reactivate an older version of my application). Maybe
something similar happend here?

Harry

Bo Berglund schrieb:

Quote

> I have an MDI application that is using a Window menu to switch
> between existing child windows. This application was developed using
> Delphi 4 and all was well. THen I updated my development environment
> to Delphi 5 and now I discover that the Window menu does not populate
> with the names of the child windows anymore. So the only way to switch
> windows now is to reduce the window size from max and then search for
> the windows in the mess that appears. Not god :-(

> What happened and what can I do to solve this problem? I have looked
> at the WindowMenu property of the main form and it displays the
> correct menu name. What else can I do?

> /Bo

Re:Windowmenu fails to populate after update to D5


I have just completed a full circuit test D5->D4->D5->D5 and I can say
for sure that the same source code compiled in D4 populates the Window
menu with the names of the MDI child forms whereas the D5 compilation
leaves the menu empty...
While looking further on the properties of the menus I found a few
strangely unknown ones in D5:
TMainMenu.AutoLineReduction and TMainMenu.AutoHotKey. These were set
to Automatic and I changed this to Manual. This actually made the
child form names appear!
Then I changed these properties back to the Automatic setting again
and strangely now the names still show up!
So by fiddling with these properties back and forth somehow the code
has changed permanently to display the child form names.

You could go crazy for lesser things! What really happened????

/Bo

On Thu, 03 Jan 2002 17:43:11 +0100, Harald Werr

Quote
<w...@avk.fraunhofer.de> wrote:
>Hi Bo,

>some more questions to clear it up:

>Do you define the menu items at design time or at run time? If at run
>time: on which occasion do you add the items (at OnActivate or OnShow of
>the main form, or...)?

>It may also have something to do with the order of creation of the MDI
>windows in relation to the creation time of the main menu. Where do you
>derive the menu entries from? Maybe something got mixed up while
>migrating from D4 to D5. When do you create the MDI forms?

>Btw., I once had a strange behavior in D3 when I lost all my OnActivate
>activities after resizing my main form at design time so that
>(unintentionally) scroll bars appeared. The OnActivate was still defined
>and still had a reference to the source code, but when executed, the
>program simply didn't jump into the OnActivate-procedures. I never got
>that fixed (hat to reactivate an older version of my application). Maybe
>something similar happend here?

>Harry

>Bo Berglund schrieb:

>> I have an MDI application that is using a Window menu to switch
>> between existing child windows. This application was developed using
>> Delphi 4 and all was well. THen I updated my development environment
>> to Delphi 5 and now I discover that the Window menu does not populate
>> with the names of the child windows anymore. So the only way to switch
>> windows now is to reduce the window size from max and then search for
>> the windows in the mess that appears. Not god :-(

>> What happened and what can I do to solve this problem? I have looked
>> at the WindowMenu property of the main form and it displays the
>> correct menu name. What else can I do?

>> /Bo

Re:Windowmenu fails to populate after update to D5


Hi Bo,

I've found some answer for you in the Borland homepage

http://www.borland.com/devsupport/delphi/fixes/delphi5/vcl.html

There they report an error in the VCL:

  Area: vcl\mdi support

  Reference Number: 71079

  Status: Open
  Date Reported: 9/16/99  (!!!!!)

  Severity: Infrequently Encountered

  Type: Minor Functionality Failure

  Problem:

  Having a MenuItem set as a WindowMenu with a
  list of MDI Children on it during runtime.  The list
  disappears if any captions are changed (even if
  they aren't the captions of the list. They return if
  another child is added.

Didn't find out yet if this bug is already fixed in an update/patch, or
at least in Delphi6...

Harry

Bo Berglund schrieb:

Quote

> I have just completed a full circuit test D5->D4->D5->D5 and I can say
> for sure that the same source code compiled in D4 populates the Window
> menu with the names of the MDI child forms whereas the D5 compilation
> leaves the menu empty...
> While looking further on the properties of the menus I found a few
> strangely unknown ones in D5:
> TMainMenu.AutoLineReduction and TMainMenu.AutoHotKey. These were set
> to Automatic and I changed this to Manual. This actually made the
> child form names appear!
> Then I changed these properties back to the Automatic setting again
> and strangely now the names still show up!
> So by fiddling with these properties back and forth somehow the code
> has changed permanently to display the child form names.

> You could go crazy for lesser things! What really happened????

> /Bo

> On Thu, 03 Jan 2002 17:43:11 +0100, Harald Werr
> <w...@avk.fraunhofer.de> wrote:

> >Hi Bo,

> >some more questions to clear it up:

> >Do you define the menu items at design time or at run time? If at run
> >time: on which occasion do you add the items (at OnActivate or OnShow of
> >the main form, or...)?

> >It may also have something to do with the order of creation of the MDI
> >windows in relation to the creation time of the main menu. Where do you
> >derive the menu entries from? Maybe something got mixed up while
> >migrating from D4 to D5. When do you create the MDI forms?

> >Btw., I once had a strange behavior in D3 when I lost all my OnActivate
> >activities after resizing my main form at design time so that
> >(unintentionally) scroll bars appeared. The OnActivate was still defined
> >and still had a reference to the source code, but when executed, the
> >program simply didn't jump into the OnActivate-procedures. I never got
> >that fixed (hat to reactivate an older version of my application). Maybe
> >something similar happend here?

> >Harry

> >Bo Berglund schrieb:

> >> I have an MDI application that is using a Window menu to switch
> >> between existing child windows. This application was developed using
> >> Delphi 4 and all was well. THen I updated my development environment
> >> to Delphi 5 and now I discover that the Window menu does not populate
> >> with the names of the child windows anymore. So the only way to switch
> >> windows now is to reduce the window size from max and then search for
> >> the windows in the mess that appears. Not god :-(

> >> What happened and what can I do to solve this problem? I have looked
> >> at the WindowMenu property of the main form and it displays the
> >> correct menu name. What else can I do?

> >> /Bo

Re:Windowmenu fails to populate after update to D5


Quote
In article <3c346fc4.140488...@forums.borland.com>, Bo Berglund wrote:
> I have an MDI application that is using a Window menu to switch
> between existing child windows. This application was developed using
> Delphi 4 and all was well. THen I updated my development environment
> to Delphi 5 and now I discover that the Window menu does not populate
> with the names of the child windows anymore. So the only way to switch
> windows now is to reduce the window size from max and then search for
> the windows in the mess that appears. Not god :-(

> What happened and what can I do to solve this problem? I have looked
> at the WindowMenu property of the main form and it displays the
> correct menu name. What else can I do?

Set the AutoLineReduction and Autohotkeys properties of the Window menu
to manual. The interfere with the Windows MDI subsystems menu handling.
These properties have been added in D5.

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!
Note: I'm unable to visit the newsgroups every day at the moment,
so be patient if you don't get a reply immediately.

Other Threads