Hahaha! Found the right solution! Now I have a firefox
interface clone!!!
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/pantdraw_4i5h.asp
Here's what I did.
{===========================}
LockWindowUpdate(Handle);
TargetMDIChild.BringToFront;
LockWindowUpdate(0);
{===========================}
--- Walter Campelo <[EMAIL PROTECTED]> wrote:
> Jonathan:
>
> I'm having the exactly the same problem as you...
> One solution that I've found is to use a TToolbar
> instead of a TMainMenu and give all
> MDIChild forms a sizeable border and a system menu.
> That way the forms are not
> restored when you change from one to another.
> Also, with the TToolbar you don't have the system
> buttons been showed on the right of the
> form menu.
> Yes, I know, this is a botch... :-((
>
> The other solution is to manually control the
> behavior thru WindowPlacement when
> changing from one form to another, more or less like
> this (thanks to Jorge Sandoval):
>
> procedure TfrmMain.MenuItemsClick(Sender: TObject);
> var
> idx: integer;
> WinPlace: TWindowPlacement;
> begin
> WinPlace.showCmd := SW_SHOWMAXIMIZED;
> WinPlace.length := SizeOf(TWindowPlacement);
> with mbtnWindow do
> begin
> for idx := 0 To pred(MDIChildCount) do
> if TMenuItem(Sender).Tag = MDIChildren[idx].Tag
> then
>
>
SetWindowPlacement(MDIChildren[idx].Handle,@WinPlace);
> end;
> end;
> // (If you need the complete test project for this
> option please e-mail me in pvt)
>
>
> With one of this things done you can control all the
> rest with a relatively easy...
>
> Hope this could help...
>
> P.S. If anyone know a real solution for the problem,
> one that put this thing to really work as
> expected, instead of these temporary solutions,
> please feel free to share with us !!!! :-)
>
> Cheers
>
///////////////////////////////////////////////////////
> Walter Andrade Campelo
> WEA Sistemas de Informatica
> Ribeirao Preto - SP - Brasil
>
///////////////////////////////////////////////////////
>
> ----- Original Message -----
> From: Jonathan Mora
> To: [email protected]
> Sent: Tuesday, March 01, 2005 1:03 AM
> Subject: [delphi-en] Control MDI Children
> Behaviour
>
>
> I've created an MDI application. Instead of
> assigning
> a menu to TForm.WindowMenu, I wanted to represent
> my
> child windows as tabs and they must always be
> maximized. I want it to look like Mozilla Firefox.
>
> {Set at design-time}
> ChildWindow.WindowState := wsMaximized;
> ChildWindow.BorderIcons := [];
>
> {Events}
> ChildWindow.OnActivate:
> ChildWindow.WindowState := wsMaximized;
>
> Now the problem is that when I switch between
> forms
> (thru code), I get an annoying
> child-window-refresh.
> Trying to find out what's causing the refresh, I
> disabled the OnActivate event. When the event is
> disabled, the child forms were being set to normal
> state instead of being maximized. Is there a
> restore
> message being sent that I should trap?
>
> To recreate the situation:
> 1) File->New->Projects->MDI Application
> 2) Open the form MDIChild
> 3) Set MDIChild.BorderIcons := []
> 4) Set MDIChild.WindowState := wsMaximized
> 5) Add "WindowState := wsMaximized" to the
> MDIChild.OnActivate event
> 6) Run the project
> 7) Click New several times
> 8) Move thru the windows in the "Window" menu,
> you'll
> then see the "refresh"
> 9) Comment the code in the MDIChild.OnActivate
> event
> 10) Move thru the windows in the "Window" menu,
> they'll all be "unmaximized"
>
> Heeelp! I want my windows to stay maximized
> without
> the noticeable refresh.
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - Find what you need with new enhanced
> search.
> http://info.mail.yahoo.com/mail_250
>
>
>
>
-----------------------------------------------------
> Home page:
> http://groups.yahoo.com/group/delphi-en/
> To unsubscribe:
> [EMAIL PROTECTED]
>
>
> Yahoo! Groups Sponsor
> ADVERTISEMENT
>
>
>
>
>
>
------------------------------------------------------------------------------
> Yahoo! Groups Links
>
> a.. To visit your group on the web, go to:
> http://groups.yahoo.com/group/delphi-en/
>
> b.. To unsubscribe from this group, send an
> email to:
> [EMAIL PROTECTED]
>
> c.. Your use of Yahoo! Groups is subject to the
> Yahoo! Terms of Service.
>
>
>
> [Non-text portions of this message have been
> removed]
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/delphi-en/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/