realbasic-games
[Top] [All Lists]

Re: Window lock

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: Window lock
From: Phil M <phil at mobleybros dot com>
Date: Tue, 26 Jul 2005 23:17:30 +0200
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <BAY103-F38B60A0618B8457F8B38D6C1CD0 at phx dot gbl>
On Jul 26, 2005, at 9:24 PM, Ken Gish wrote:

Is there a way to "lock" an entire Window (and controls - such as PushButtons, EditFields, etc. - within a Window) so that it is visible (looks normal; not disabled which grays out the Window) but won't accept any input (mainly mouse input)?

Put a Canvas on top of everything else and make sure that you return True for MouseDown and KeyDown events. To be on the safe side, use this code in these two events:

   If Me.Enabled Then Return True

That way you can control the capturing of these inputs by setting the canvas enable state. Since there is no drawing code, the Canvas will appear invisible.

Just note that this will only protect the area within the Window... not the Title bar or anything else. So this means that a user would be able to move the Window, and possibly minimize and close it (if you don't return True in the CancelClose event). There might be declares that you can use to lock the Window position and disable the minimize/maximize/close buttons temporarily.

Related to this question, is there any way to disable the MoviePlayer control from accepting mouse clicks (clicking the MoviePlayer window is pausing playback and I don't want that to happen)?

Don't know. The above trick might work, but might not either since the MoviePlayer is an external control and might be immune.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>