--------- WARNING ---------
ALL RIGHTS RESERVED

This unlicensed version of  VBMMOUS.VBX is provided for evaluation only. Without a licensing agreement or written authorization form the author, VBMMOUS.VBX can not be  legally included in any project or application  used by persons other than the software developer evaluating this product. This message must be included with any redistribution of this unlicensed version VBMMOUS.VBX . Removal of this message or failure to abide by the conditions noted above will be considered infringement of copyright.

This beta test version of VBMMOUS.VBX (version .91) is distributed for beta testing and evaluation only and is not warranted in any way. This unlicensed version of VBMMOUS.VBX will only work properly running in conjunction with Visual Basic 2.0 or Visual Basic 3.0 under Windows 3.1, Windows 3.11, or Windows for Workgroups. It will not function properly and may create undesirable conditions if used under any 32 bit operating system including WindowsNT and Windows 95 (Chicago).

VBMMOUS.VBX  is one of a suite of Visual Basic VBX and OLE custom controls currently under development by CSO (the Contract Services Organization) to be called VBMoreControl. It is anticipated that the full product suite will be released during the spring of 1995 with 16 bit VBX versions 16 bit OLE Versions and 32 bit OLE versions. 
 
Users who formally register as beta testers will be provided with the suite of VBMoreControl custom controls (without a registration request box that pops up) for testing and evaluation and will receive a 50% discount on the fully licensed products upon formal release. To register as a beta tester, receive additional product information, or make suggestions for control features, please write to: 

CSO
Tim Brown
13715 NE 36th Place
Bellevue, Wa. 98005

or send e mail to 

73557.3461@COMPUSERVE.COM

VBMMOUSE.VBX has two types of properties, informational properties and action properties. The informational properties provide information about the system mouse. The action properties are used to control what the mouse pointer does when one of the Options is selected and the Action is set to true. Not all properties are used for all options. For instance the Free Mouse option uses no properties other than the Options itself and the Action property. The Window Mouse option uses the WindowID property as well as the Action property and of course the Options property.

In general the information properties are read only. The exceptions are the DoubleClickTime property, the HideMouse property, and the LockInput.property which, when changed immediately effect the system working environment. These properties effect the entire Windows system and should be used with care.
Center Mouse   0

Utilizes

Property WindowID

Description

When the Center Mouse option is selected and the Action property is set to True, the mouse pointer moves to the center of the Window (form or control) identified in the WindowID property.

Usage

[form.]Mouse1.WindowID = 0
[form.]Mouse1.Options = VBMCENTERMOUSE or [form.]Mouse1.Options = 0
[form.]Mouse1.Action = True

Result - Mouse pointer moves to the center of the form

Remarks

An error occurs if the WindowID property is set to other than 0 (screen) or a valid Windows hWnd. If the center of the Window is not within the screen display a warning message is returned and the mouse pointer is placed on the screen at a point closest to the center of the Window that is visible on the screen.

Numeric Value
0
Free Mouse   1

Utilizes

no other properties utilized

Description

When the mouse pointer is restricted after activating the Restrict MouseARestrictMouse, ViewPort MouseAViewPortMouse, or Window MouseAWindowMouse options it can be freed to access the entire screen by activating the Free Mouse Option.

Usage

[form.]Mouse1.WindowID = Form1.hWnd
[form.]Mouse1.Action = True
[form.]Mouse1.Options = VBMFREEMOUSE or [form.]Mouse1.Options = 1
[form.]Mouse1.Action = True

Result - Restrict mouse pointer to a form and then frees it.

Remarks

Note: Mouse movement restrictions effect the entire Windows environment. Mouse pointer restriction features should not be used when access to other applications is needed and restrictions should always be eliminated using the Free Mouse option or the Reset option before exiting an application.

Numeric Value
1
Get Position   2

Utilizes

FromX
FromY
Property WindowID

Description

When the GetPosition option is selected and the Action property is set to True, the FromX and FromY properties are set to reflect the current location of the mouse pointer relative to the coordinates of the Window identified in the WindowID property. If the WindowID property is set to 0 (screen), the WindowID property changes to identify the hWnd of the top most Window under the mouse pointer.

Usage

[form.]Mouse1.WindowID = 0
[form.]Mouse1.Options = VBMGETPOSITION or [form.]Mouse1.Options = 2
[form.]Mouse1.Action = True

Result - The FromX and FromY reflect the current screen coordinates of the mouse pointer and the WindowID property reflects the hWnd of the Window under the mouse pointer.

Remarks

Note: Previous values in FromX , FromY and WindowID properties will be lost after activating the GetPosition option. An error occurs if the WindowID property is set to other than 0 (screen) or a valid Windows hWnd.

Numeric Value
2
Left Click   3

Utilizes

Property ToX
Property ToY
Property WindowID


Description

When the Left Click option is selected and the Action property is set to True, a left button click event is generated at the location specified in the ToX property and the ToY property relative to the coordinates of the window whose hWnd is noted in the WindowID property. If the WindowID property is 0, the click event is based on screen coordinates.

Usage

[form.]Mouse1.ToX = Screen.TwipsToPixels(Screen.Width / 2)
[form.]Mouse1.ToY = Screen.TwipsToPixels(Screen.Hieght / 2)
[form.]Mouse1.WindowID = 0
[form.]Mouse1.Options = VBMLEFTCLICK or [form.]Mouse1.Options = 3
[form.]Mouse1.Action = True

Result - Mouse click event on the window in the center of the screen.

Remarks

VBMMouse mouse button actions actually duplicate internal operations normally generated by mouse drivers. For all intents and purposes Windows assumes the mouse buttons have actually been clicked on the top most Window at the specified location. Even if coordinates are specified based on a specific Window position (as identified in the WindowID property) that window may not receive mouse messages if it is not the topmost window. A click event generates a mouse down and mouse up event in the process of creating a click event.

Numeric Value
3
Left Dbl Click   4

Utilizes

Property ToX
Property ToY
Property WindowID

Description

When the Left Dbl Click option is selected and the Action property is set to True, a left button double click event is generated at the location specified in the ToX property and the ToY property relative to the coordinates of the window whose hWnd is noted in the WindowID property. If the WindowID property is 0, the click event is based on screen coordinates.

Usage

[form.]Mouse1.ToX = (Screen.Width / 2) / Screen.TwipsPerPixelX
[form.]Mouse1.ToY = (Screen.Hieght / 2) / Screen.TwipsPerPixelY
[form.]Mouse1.WindowID = 0
[form.]Mouse1.Options = VBMLEFTDBLCLICK or [form.]Mouse1.Options = 4
[form.]Mouse1.Action = True

Result - Mouse double click event on the window in the center of the screen.

Remarks

VBMMouse mouse button actions actually duplicate internal operations normally generated by mouse drivers. For all intents and purposes Windows assumes the mouse buttons have actually been double clicked on the top most Window at the specified location. Even if coordinates are specified based on a specific Window position (as identified in the WindowID property) that window may not receive mouse messages if it is not the topmost window. A double click event generates a mouse down, mouse up, mouse down and mouse up event in the process of creating a click event.

Numeric Value
4
Left Down   5

Utilizes

Property ToX
Property ToY
Property WindowID

Description

When the Left Down option is selected and the Action property is set to True, a left button down event is generated at the location specified in the ToX property and the ToY property relative to the coordinates of the window whose hWnd is noted in the WindowID property. If the WindowID property is 0, the button down event is based on screen coordinates.

Usage

[form.]Mouse1.ToX 0
[form.]Mouse1.ToY 0
[form.]Mouse1.WindowID = Command1.hWnd
[form.]Mouse1.Options = VBMLEFTDOWN or [form.]Mouse1.Options = 5
[form.]Mouse1.InputLocked = True
[form.]Mouse1.Action = True
NowTimer% = Timer
While Timer < NowTimer% + 2
Wend
[form.]Mouse1.Options = VBMLEFTUP or [form.]Mouse1.Options = 6
[form.]Mouse1.Action = True
[form.]Mouse1.InputLocked = False

Result - Creates impression of the "Command1" button being clicked with a visual delay between mouse button down and mouse button up activities..

Remarks

VBMMouse mouse button actions actually duplicate internal operations normally generated by mouse drivers. For all intents and purposes Windows assumes the mouse buttons have actually been pressed down on the top most Window at the specified location. Even if coordinates are specified based on a specific Window position (as identified in the WindowID property) that window may not receive mouse messages if it is not the topmost window.

A button down action should normally be quickly accompanied by button up action. Windows will interpret a hardware mouse up event as corresponding to the VBMMOUSE.VBX LeftDown action if a LeftUp action is not initiated before the hardware mouse is actually clicked. The InputLocked property would normally be set to True between LeftDown and LeftUp actions to preclude the possibility of incongruent mouse messaging. The main use of button down actions would be to create drag and drops in a demonstration.

Numeric Value
5
Left Up   6

Utilizes

Property ToX
Property ToY
Property WindowID

Description

When the Left Up option is selected and the Action property is set to True, a left button up event is generated at the location specified in the ToX property and the ToY property relative to the coordinates of the window whose hWnd is noted in the WindowID property. If the WindowID property is 0, the button down event is based on screen coordinates.

Usage

[form.]Mouse1.ToX 0
[form.]Mouse1.ToY 0
[form.]Mouse1.WindowID = Command1.hWnd
[form.]Mouse1.Options = VBMLEFTDOWN or [form.]Mouse1.Options = 5
[form.]Mouse1.InputLocked = True
[form.]Mouse1.Action = True
NowTimer% = Timer
While Timer < NowTimer + 2
Wend
[form.]Mouse1.Options = VBMLEFTUP or [form.]Mouse1.Options = 6
[form.]Mouse1.Action = True
[form.]Mouse1.InputLocked = False

Result - Creates impression of the "Command1" button being clicked with a visual delay between mouse button down and mouse button up activities..

Remarks

VBMMouse mouse button actions actually duplicate internal operations normally generated by mouse drivers. For all intents and purposes Windows assumes the mouse buttons have actually been let up on the top most Window at the specified location. Even if coordinates are specified based on a specific Window position (as identified in the WindowID property) that window may not receive mouse messages if it is not the topmost window.

A button up action should normally be recently preceded by button down action. Windows will interpret a hardware mouse up event as corresponding to the most recent left mouse button down event whether or not that action was triggered from code or from a hardware action. The InputLocked property would normally be set to True between LeftDown and LeftUp actions to preclude the possibility of incongruent mouse messaging. The main use of button down actions would be to create drag and drops in a demonstration.

Numeric Value
6
Mouse Move   7

Utilizes

FromX
FromY
ToX
ToY
PixelsPerSec
Property WindowID

Description

When the Mouse Move option is selected and the Action property is set to True, the mouse pointer visibly moves from the coordinates designated in the FromX and FromY properties to the coordinates designated in the ToX and ToY properties at the speed identified in the PixelsPerSec property. Movements reflect the current location of the mouse pointer relative to the coordinates of the Window identified in the WindowID property. If the WindowID property is set to 0 (screen), coordinates are based on the entire screen. If .FromX and / or FromY, properties are set to negative numbers, movements will be from the current X and / or Y position. If .ToX and / or ToY, properties are set to negative numbers, movements will be to the current X and / or Y position.

Usage

[form.]Mouse1.WindowID = 0
[form.]Mouse1.FromX = 0
[form.]Mouse1.FromY = 0
[form.]Mouse1.ToX = Screen.Width / Screen.TwipsPerPixelX
[form.]Mouse1.ToX = Screen.Height / Screen.TwipsPerPixelX
[form.]Mouse1.PixelsPerSec = 250
 [form.]Mouse1.Options = VBMMOUSEMOVE or [form.]Mouse1.Options = 7
[form.]Mouse1.Action = True

Result - Visibly moves the mouse pointer from the top left corner of the screen to the lower right corner of the screen.

Remarks

An error occurs if the WindowID property is set to other than 0 (screen) or a valid Windows hWnd.

Numeric Value
7
Position Mouse   8

Utilizes

ToX
ToY
PixelsPerSec
Property WindowID

Description

When the MousePosition option is selected and the Action property is set to True, the mouse pointer instantly moves to the coordinates designated in the ToX and ToY properties Movements reflect the location of the mouse pointer relative to the coordinates of the Window identified in the WindowID property. If the WindowID property is set to 0 (screen), coordinates are based on the entire screen. If .ToX and / or ToY, properties are set to negative numbers, movements will be to the current X and / or Y position respectively.

Usage

[form.]Mouse1.WindowID = 0
[form.]Mouse1.FromX = 0
[form.]Mouse1.FromY = 0
[form.]Mouse1.ToX = Screen.Width / Screen.TwipsPerPixelX
[form.]Mouse1.ToX = Screen.Height / Screen.TwipsPerPixelX
[form.]Mouse1.PixelsPerSec = 250
 [form.]Mouse1.Options = VBMMOUSEMOVE or [form.]Mouse1.Options = 8
[form.]Mouse1.Action = True

Result - Visibly moves the mouse pointer from the top left corner of the screen to the lower right corner of the screen.

Remarks

An error occurs if the WindowID property is set to other than 0 (screen) or a valid Windows hWnd.

Numeric Value
8
Reset Mouse   9

Utilizes

no other properties utilized

Description

When the Reset Mouse option is activating and the Action property is set to True, the mouse pointer will be freed if currently restricted, shown if currently hidden, and returned to the screen coordinates where to last mouse positioning option was activated.

Usage

 [form.]Mouse1.Options = VBMRESETMOUSE or [form.]Mouse1.Options = 9
[form.]Mouse1.Action = True

Result - Eliminates any mouse pointer restrictions imposed by VBMMOUSE.VBX and sets the mouse pointer back to the position it was in before the last mouse positioning option was activated.

Remarks

The Reset Mouse option should usually activated when an application ends to ensure there are no mouse pointer restrictions in place that would effect other applications.

Numeric Value
9
Restrict Mouse   10

Utilizes

FromX
FromY
ToX
ToY
Property WindowID

Description

When the Restrict Mouse option is selected and the Action property is set to True, the mouse pointer will be restricted to the area to the left of the FromX property, below the FromY property to the right of the ToX property and above the ToY property. Positions are relative to the coordinates of the Window identified in the WindowID property. If the WindowID property is set to 0 (screen), coordinates are based on the entire screen. If . FromX property, FromY property ToX property and / or ToY property are set to negative numbers, those positions will be based on current mouse pointer positions.

Usage

[form.]Mouse1.WindowID = 0
[form.]Mouse1.FromX = 0
[form.]Mouse1.FromY = 0
[form.]Mouse1.ToX = Screen.Width / TwipsPerPixelX
[form.]Mouse1.ToX = -1
[form.]Mouse1.Options = VBMRESTRICTMOUSE or [form.]Mouse1.Options = 10
[form.]Mouse1.Action = True

Result - Mouse pointer will not be able to move below current position.

Remarks

An error occurs if the WindowID property is set to other than 0 (screen) or a valid Windows hWnd.

Numeric Value
10
Right Click   11

Utilizes

Property ToX
Property ToY
Property WindowID


Description

When the Right Click option is selected and the Action property is set to True, a right button click event is generated at the location specified in the ToX property and the ToY property relative to the coordinates of the window whose hWnd is noted in the WindowID property. If the WindowID property is 0, the click event is based on screen coordinates.

Usage

[form.]Mouse1.ToX = Screen.TwipsToPixels(Screen.Width / 2)
[form.]Mouse1.ToY = Screen.TwipsToPixels(Screen.Hieght / 2)
[form.]Mouse1.WindowID = 0
[form.]Mouse1.Options = VBMRIGHTCLICK or [form.]Mouse1.Options = 11
[form.]Mouse1.Action = True

Result - Mouse click event on the window in the center of the screen.

Remarks

VBMMouse mouse button actions actually duplicate internal operations normally generated by mouse drivers. For all intents and purposes Windows assumes the mouse buttons have actually been clicked on the top most Window at the specified location. Even if coordinates are specified based on a specific Window position (as identified in the WindowID property) that window may not receive mouse messages if it is not the topmost window. A click event generates a mouse down and mouse up event in the process of creating a click event.

Numeric Value
11
Right Dbl Click   12

Utilizes

Property ToX
Property ToY
Property WindowID

Description

When the Right Dbl Click option is selected and the Action property is set to True, a right button double click event is generated at the location specified in the ToX property and the ToY property relative to the coordinates of the window whose hWnd is noted in the WindowID property. If the WindowID property is 0, the click event is based on screen coordinates.

Usage

[form.]Mouse1.ToX = (Screen.Width / 2) / Screen.TwipsPerPixelX
[form.]Mouse1.ToY = (Screen.Hieght / 2) / Screen.TwipsPerPixelY
[form.]Mouse1.WindowID = 0
[form.]Mouse1.Options = VBMRIGHTDBLCLICK or [form.]Mouse1.Options = 12
[form.]Mouse1.Action = True

Result - Mouse double click event on the window in the center of the screen.

Remarks

VBMMouse mouse button actions actually duplicate internal operations normally generated by mouse drivers. For all intents and purposes Windows assumes the mouse buttons have actually been double clicked on the top most Window at the specified location. Even if coordinates are specified based on a specific Window position (as identified in the WindowID property) that window may not receive mouse messages if it is not the topmost window. A double click event generates a mouse down, mouse up, mouse down and mouse up event in the process of creating a click event.

Numeric Value
12
Right Down   13

Utilizes

Property ToX
Property ToY
Property WindowID

Description

When the Right Down option is selected and the Action property is set to True, a right button down event is generated at the location specified in the ToX property and the ToY property relative to the coordinates of the window whose hWnd is noted in the WindowID property. If the WindowID property is 0, the button down event is based on screen coordinates.

Usage

[form.]Mouse1.ToX 0
[form.]Mouse1.ToY 0
[form.]Mouse1.WindowID = Command1.hWnd
[form.]Mouse1.Options = VBMRIGHTDOWN or [form.]Mouse1.Options = 13
[form.]Mouse1.InputLocked = True
[form.]Mouse1.Action = True
NowTimer% = Timer
While Timer < NowTimer + 2
Wend
[form.]Mouse1.Options = VBMRIGHTUP or [form.]Mouse1.Options =14
[form.]Mouse1.Action = True
[form.]Mouse1.InputLocked = False

Result - Creates impression of the "Command1" button being clicked with a visual delay between mouse button down and mouse button up activities..

Remarks

VBMMouse mouse button actions actually duplicate internal operations normally generated by mouse drivers. For all intents and purposes Windows assumes the mouse buttons have actually been pressed down on the top most Window at the specified location. Even if coordinates are specified based on a specific Window position (as identified in the WindowID property) that window may not receive mouse messages if it is not the topmost window.

A button down action should normally be quickly accompanied by button up action. Windows will interpret a hardware mouse up event as corresponding to the VBMMOUSE.VBX RightDown action if a RightUp action is not initiated before the hardware mouse is actually clicked. The InputLocked property would normally be set to True between RightDown and RightUp actions to preclude the possibility of incongruent mouse messaging. The main use of button down actions would be to create drag and drops in a demonstration.

Numeric Value
13
RightUp   14

Utilizes

Property ToX
Property ToY
Property WindowID

Description

When the Left Up option is selected and the Action property is set to True, a right button up event is generated at the location specified in the ToX property and the ToY property relative to the coordinates of the window whose hWnd is noted in the WindowID property. If the WindowID property is 0, the button up event is based on screen coordinates.

Usage

[form.]Mouse1.ToX 0
[form.]Mouse1.ToY 0
[form.]Mouse1.WindowID = Command1.hWnd
[form.]Mouse1.Options = VBMRIGHTDOWN or [form.]Mouse1.Options = 13
[form.]Mouse1.InputLocked = True
[form.]Mouse1.Action = True
NowTimer% = Timer
While Timer < NowTimer + 2
Wend
[form.]Mouse1.Options = VBMRIGHTUP or [form.]Mouse1.Options = 14
[form.]Mouse1.Action = True
[form.]Mouse1.InputLocked = False

Result - Creates impression of the "Command1" button being clicked with a visual delay between mouse button down and mouse button up activities..

Remarks

VBMMouse mouse button actions actually duplicate internal operations normally generated by mouse drivers. For all intents and purposes Windows assumes the mouse buttons have actually been let up on the top most Window at the specified location. Even if coordinates are specified based on a specific Window position (as identified in the WindowID property) that window may not receive mouse messages if it is not the topmost window.

A button up action should normally be recently preceded by a button down action. Windows will interpret a hardware mouse up event as corresponding to the most recent left mouse button down event whether or not that action was triggered from code or from a hardware action. The InputLocked property would normally be set to True between RightDown and RightUp actions to preclude the possibility of incongruent mouse messaging. The main use of button up actions would be to create drag and drops in a demonstration.

Numeric Value
14
ViewPort Mouse   15

Utilizes

Property WindowID

Description

When the ViewPort Mouse option is selected and the Action property is set to True, the mouse pointer will be restricted to the client area (excludes title bar) of the Window identified in the WindowID property. If the WindowID property is set to 0 (screen), the mouse pointer is not restricted.

Usage

[form.]Mouse1.WindowID = form1.hWnd
[form.]Mouse1.Options = VBMRESTRICTMOUSE or [form.]Mouse1.Options = 15
[form.]Mouse1.Action = True

Result - Mouse pointer is restricted to the client area of  'form1'.

Remarks

An error occurs if the WindowID property is set to other than 0 (screen) or a valid Windows hWnd.

Numeric Value
15
Window Mouse   16

Utilizes

Property WindowID

Description

When the ViewPort Mouse option is selected and the Action property is set to True, the mouse pointer will be restricted to the form or control (includes title bar) of the Window identified in the WindowID property. If the WindowID property is set to 0 (screen), the mouse pointer is not restricted.

Usage

[form.]Mouse1.WindowID = form1.hWnd
[form.]Mouse1.Options = VBMRESTRICTMOUSE or [form.]Mouse1.Options = 16
[form.]Mouse1.Action = True

Result - Mouse pointer is restricted to 'form1'.

Remarks

An error occurs if the WindowID property is set to other than 0 (screen) or a valid Windows hWnd.

Numeric Value
16
