EnableW Command

Purpose

Enables mouse and keyboard input for a window.

Syntax

EnableW wh%

wh%:integer expression

Description

The mouse and keyboard input for windows can be controlled separately. EnableW enables these inputs for the window specified in wh%, DisableW disables them.

wh% is a value between 0 and 31 to identify a window, or a window handle.

Example

OpenW 1

Ocx Command cmd = "Click Me", 100, 50, 100, 22

DisableW 1

Print "Window Disabled - Status = "; Enabled?(1)

Local t As Double = Timer

While Timer - t < 5

Print AT(1, 2); "Window disabled for "; Int(5.99 - (Timer - t)); " seconds"

Wend

EnableW 1

Print "Window Re-enabled - Status = "; Enabled?(1)

Do : Sleep : Until Me Is Nothing

 

Sub cmd_Click

Message "Button Clicked"

EndSub

Now input (mouse & keyboard) is possible again. The input for window 1 is first deactivated and the reactivated.

See Also

DisableW, Enabled?()

{Created by Sjouke Hamstra; Last updated: 04/10/2014 by James Gaite}