Why don't you create those forms as modal? I hope you have an ancestor form
for all the existing forms in your project where you can override the
CreateParams and Create procedures to launch the form as you want.

For example:

1) TFormAncestor is the ancestor form of my project (every form but main
form inherits from this TFormAncestor).

2) TFromModalAncestor inherits from TFormAncestor. All forms inheriting from
TFormModalAncestor or its descendants can be launched as modal or modless
according to a prameter specified during the creation of the form from
within a class function I have called LaunchForm

procedure TFormModalAncestor.CreateParams(var Params: TCreateParams);
begin
  inherited CreateParams(Params);

  if (gCreateFormAsModal) then begin
    FormStyle      := fsNormal;
    Visible            := false;
  end ;

end;


        This way, if you really want a certain form to act like a modal you will
launch it as a modal form. I hope this is what you want, in case you need
more details about the mechanism dont hesitate to ask...

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] Behalf
Of Assaf Stone
Sent: Wednesday, February 22, 2006 1:51 PM
To: [email protected]
Subject: [delphi-en] Disabling Ctrl+Tab and Shift+Ctrl+Tab in an MDI child


Hello all.
I'm using Delphi-7, and I have an MDI Form which at a certain point has
2 children.
I want to disable the users ability to jump through them (i.e. use
ctrl-tab), so that the 2nd form is EFFECTIVELY shown modally (yes, I
know, MDI children can't be modal, because you can't make visible forms
modal, and you can't set children to be invisible).

Can anybody help me disabling the shortcut?

I tried overriding the OnShortCut event, but I can't get it to
acknowledge the ctrl-tab or ctrl+shift+tab key combo).

Thanks,
Assaf.

Assaf Stone
Spacelogic ltd.
[EMAIL PROTECTED]
Tel: 972-9-8855565 ext. #315



[Non-text portions of this message have been removed]



-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED]
Yahoo! Groups Links








-----------------------------------------------------
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/
 


Reply via email to