🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.nativeapi
Article #12101

Re: Disable Switch between MdiChild Windows?

#12101
From: Kurt Barthelmess (TeamB)
Date: Sat, 23 Nov 2002 16:01
30 lines
1909 bytes
"Milan Miladinovic" <milanbetter@hotmail.com> wrote:

>How to Disable user to switch between MdiChild pressing Ctrl + F6

To disable the [Ctrl]+F6, give the MDI child a message handler like:

    procedure WMSysCommand(var Msg: TWMSysCommand);
      message WM_SYSCOMMAND;
...
procedure TMDIChild.WMSysCommand(var Msg: TWMSysCommand);
begin
  if Msg.CmdType = SC_NEXTWINDOW then
    Msg.Result := 0
  else inherited;
end;

However, this will not prevent the user from using other techniques to
swtich children. For example, [Ctrl]+[Shift]+F6 will switch to the
previous child. (You can test for SC_PREVWINDOW in the above as well
to prevent that.) [Ctrl]+[Tab] and [Ctrl]+[Shift]+[Tab] are disabled
with the F6 equivalents, but mouse clicks still work as do the menu
items under the Window main menu item.

There doesn't seem to be much point in having an MDI application where
only one window is available, however. You probably ought to rethink
your design to see if it really fits the MDI model.

Good luck.

Kurt
Technical Details
Message-ID: <3ddfa4cc.3744664@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-04!supernews.com!news.maxwell.syr.edu!eusc.inter.net!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!not-for-mail
References: <3ddf2c60@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f94dd,d1d27c614dade785
X-Google-Attributes: gidf94dd,public
X-Google-ArrivalTime: 2002-11-23 08:16:05 PST
From: kbarthelmess@compuserve.com (Kurt Barthelmess (TeamB))
Newsgroups: borland.public.delphi.nativeapi
Subject: Re: Disable Switch between MdiChild Windows?
Date: Sat, 23 Nov 2002 16:01:06 GMT
Organization: Scharf Systems
Message-ID: <3ddfa4cc.3744664@newsgroups.borland.com>
References: <3ddf2c60@newsgroups.borland.com>
X-Newsreader: Forte Free Agent 1.21/32.243
NNTP-Posting-Host: 216.192.33.7
X-Trace: newsgroups.borland.com 1038067264 216.192.33.7 (23 Nov 2002 08:01:04 -0800)
Lines: 31
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-04!supernews.com!news.maxwell.syr.edu!eusc.inter.net!fu-berlin.de!news.uni-x.net!newsgroups.borland.com!not-for-mail