Click or drag to resize

InsMode Function (Logic)

X#
Returns the current insert mode, or sets the insert mode on or off.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.21
Syntax
 FUNCTION InsMode(
	lSetOn AS LOGIC
) AS LOGIC
Request Example View Source

Parameters

lSetOn
Type: Logic
Turns the insert mode on or off. InsMode(.T.) turns the insert mode on and InsMode(.F.) turns it off.

Return Value

Type: Logic
A logical value corresponding to the insert mode setting before InsMode(.T.) or InsMode(.F.) was issued is returned.
Remarks
If you omit the optional argument and the insert mode is on (characters are inserted before the cursor), InsMode( ) returns true (.T.). If the insert mode is off (characters are overwritten at the insertion point), InsMode( ) returns false (.F.).
Examples
X#
1=InsMode(.T.)  // Set insert mode on
2? InsMode( )
3= InsMode(!InsMode( ))  // Toggle insert mode to opposite state
4? InsMode( )
See Also