What I really need is help disabling the short-cut. That ability will be helpful in other parts of the project. I want the MDI child to be within it's parent and for the parent to continue functioning. I simply want to disable the user's ability to iterate between child-forms.
-----Original Message----- From: Vahan Yoghoudjian [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 22, 2006 2:15 PM To: [email protected] Subject: RE: [delphi-en] Disabling Ctrl+Tab and Shift+Ctrl+Tab in an MDI child 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 This mail arrived via mail.pineapp.net ************************************************************************ ************ This footnote confirms that this email message has been scanned by PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses. ************************************************************************ ************ ----------------------------------------------------- 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/

