Re: MDI Children
"php99jh" <[email protected]> Fri, 22 Aug 2003 10:00:14 -0000
| Newsgroups | gmane.comp.lang.delphi.programming |
|---|---|
| Message-ID | <[email protected]> |
OK, I figured it out myself. I just needed to add BringToFront; Still a bit confused though - the Delphi help file states that the form with focus has the "colored" title bar. I have to use BringToFront to achieve this. Never mind. --- In [email protected], "php99jh" <php99jh@s...> wrote: > Hi all, > > How do I give focus to a MDI child? I have some code to respond > when a Child window is clicked on (with the right mouse button). > Under normal circumstances right-clicking does not give focus to the > window. My code is : > > { private declarations } > procedure WMNCRButtonDown(var M: TWMNCRButtonDown); message > wm_NCRButtonDown; > . > . > . > procedure TMDIChildForm.WMNCRButtonDown(var M: TWMNCRButtonDown); > begin > { My code to respond to right-click here } > end; > > The code is called correctly when the user right-clicks on any child > window. I put a SetFocus command in the procedure (expecting that > the form that the user clicked on would become the focussed window) > but nothing happens. > > What am I doing wrong? > > Cheers, > > Jonathan Hill. ------------------------ Yahoo! Groups Sponsor ---------------------~--> Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511 http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/i7folB/TM ---------------------------------------------------------------------~-> Delphi VCL Top Sites! http://www.sandbrooksoftware.com/TS/TS2/Components.shtml --------------------------------------------------------------- Unsubscribe:[email protected] List owner:[email protected] --------------------------------------------------------------- Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/