読者です 読者をやめる 読者になる 読者になる

クリック範囲、タッチ範囲、ダブルクリックの猶予時間について

ダブルクリック範囲
System.Windows.Forms.SystemInformation.DoubleClickSize
https://referencesource.microsoft.com/#System.Windows.Forms/winforms/Managed/System/WinForms/SystemInformation.cs

タッチ範囲は System.Windows.Input.StylusLogic をリフレクションで取得すること
ただし.Net4.6以降じゃないと記述が足りないので.Net4.6のソースからコピーしましょう
https://referencesource.microsoft.com/#PresentationCore/Core/CSharp/System/Windows/Input/Stylus/StylusLogic.cs

// 謎
DoubleTapDelta
DoubleTapDeltaTime

// タッチ
touchDoubleTapDelta
touchDoubleTapDeltaTime

// ペン
stylusDoubleTapDelta
stylusDoubleTapDeltaTime

/// <summary>
/// .net 4.5 だと ラッパー では足りないため、コピーした
/// TouchModeN_DtapDist、TouchModeN_DtapTimeがない
/// </summary>
public class StylusLogic {

	public static StylusLogic Current = new StylusLogic();


	public StylusLogic() {
		ReadSystemConfig();
	}

	#region DoubleTapDelta
	/// <summary>
	/// ダブルタップの有効範囲を取得します
	/// </summary>
	public int DoubleTapDelta {
		get {
			//if( _DoubleTapDelta == -1 ) {
			//	_DoubleTapDelta = (int)stylusLogicType.InvokeMember( "DoubleTapDelta", BindingFlags.GetProperty | BindingFlags.Instance | BindingFlags.NonPublic, null, stylusLogic, null );
			//}
			return _DoubleTapDelta;
		}
	}
	int _DoubleTapDelta = -1;
	#endregion


	#region DoubleTapDeltaTime
	/// <summary>
	/// ダブルタップの有効速度を取得します
	/// </summary>
	public int DoubleTapDeltaTime {
		get {
			return _DoubleTapDeltaTime;
		}
	}
	int _DoubleTapDeltaTime = -1;
	#endregion


	#region touchDoubleTapDelta
	/// <summary>
	/// タッチでのダブルタップの有効範囲を取得します
	/// </summary>
	public int touchDoubleTapDelta {
		get {
			return _touchDoubleTapDelta;
		}
	}
	int _touchDoubleTapDelta = 45;

	#endregion

	#region touchDoubleTapDeltaTime
	/// <summary>
	/// タッチでのダブルタップの有効速度を取得します
	/// </summary>
	public int touchDoubleTapDeltaTime {
		get {
			return _touchDoubleTapDeltaTime;
		}
	}
	int _touchDoubleTapDeltaTime = 300;
	#endregion


	#region stylusDoubleTapDelta
	/// <summary>
	/// スタイラスでのダブルタップの有効範囲を取得します
	/// </summary>
	public int stylusDoubleTapDelta {
		get {
			return _stylusDoubleTapDelta;
		}
	}
	int _stylusDoubleTapDelta = 15;
	#endregion

	#region stylusDoubleTapDeltaTime
	/// <summary>
	/// スタイラスでのダブルタップの有効速度を取得します
	/// </summary>
	public int stylusDoubleTapDeltaTime {
		get {
			return _stylusDoubleTapDeltaTime;
		}
	}
	int _stylusDoubleTapDeltaTime = 800;
	#endregion

	private const double DoubleTapMinFactor = 0.7; // 70% of the default threshold.
	private const double DoubleTapMaxFactor = 1.3; // 130% of the default threshold.

	private int _cancelDelta = 10;

	/// <summary>
	/// Grab the defualts from the registry for the double tap thresholds.
	/// </summary>
	///<SecurityNote>
	/// Critical - Asserts read registry permission...
	///           - TreatAsSafe boundry is the constructor
	///           - called by constructor
	///</SecurityNote>
	[SecurityCritical]
	private void ReadSystemConfig() {
		object obj;
		RegistryKey stylusKey = null; // This object has finalizer to close the key.
		RegistryKey touchKey = null; // This object has finalizer to close the key.

		// Acquire permissions to read the one key we care about from the registry
		new RegistryPermission( RegistryPermissionAccess.Read,
			"HKEY_CURRENT_USER\\Software\\Microsoft\\Wisp" ).Assert(); // BlessedAssert

		try {
			stylusKey = Registry.CurrentUser.OpenSubKey( "Software\\Microsoft\\Wisp\\Pen\\SysEventParameters" );

			if( stylusKey != null ) {
				obj = stylusKey.GetValue( "DblDist" );
				_stylusDoubleTapDelta = ( obj == null ) ? _stylusDoubleTapDelta : (Int32)obj;      // The default double tap distance is 15 pixels (value is given in pixels)

				obj = stylusKey.GetValue( "DblTime" );
				_stylusDoubleTapDeltaTime = ( obj == null ) ? _stylusDoubleTapDeltaTime : (Int32)obj;      // The default double tap timeout is 800ms

				obj = stylusKey.GetValue( "Cancel" );
				_cancelDelta = ( obj == null ) ? _cancelDelta : (Int32)obj;      // The default move delta is 40 (4mm)
			}

			touchKey = Registry.CurrentUser.OpenSubKey( "Software\\Microsoft\\Wisp\\Touch" );

			if( touchKey != null ) {
				obj = touchKey.GetValue( "TouchModeN_DtapDist" );
				// min = 70%; max = 130%, these values are taken from //depot/winblue_gdr/drivers/tablet/platform/pen/inteng/core/TapsParameterizer.cpp
				_touchDoubleTapDelta = ( obj == null ) ? _touchDoubleTapDelta : FitToCplCurve( _touchDoubleTapDelta * DoubleTapMinFactor, _touchDoubleTapDelta, _touchDoubleTapDelta * DoubleTapMaxFactor, (Int32)obj );

				obj = touchKey.GetValue( "TouchModeN_DtapTime" );
				_touchDoubleTapDeltaTime = ( obj == null ) ? _touchDoubleTapDeltaTime : FitToCplCurve( _touchDoubleTapDeltaTime * DoubleTapMinFactor, _touchDoubleTapDeltaTime, _touchDoubleTapDeltaTime * DoubleTapMaxFactor, (Int32)obj );
			}
		} finally {
			RegistryPermission.RevertAssert();
			if( stylusKey != null ) {
				stylusKey.Close();
			}
			if( touchKey != null ) {
				touchKey.Close();
			}
		}
	}


	/// <summary>
	/// Fit to control panel controlled curve. 0 matches min, 50 - default, 100 - max
	/// (the curve is 2 straight line segments connecting  the 3 points)
	/// </summary>
	private int FitToCplCurve( double vMin, double vMid, double vMax, int value ) {
		if( value < 0 ) {
			return (int)vMin;
		}
		if( value > 100 ) {
			return (int)vMax;
		}
		double f = (double)value / 100.0;
		double v = Math.Round( f <= 0.5 ? vMin + 2.0 * f * ( vMid - vMin ) : vMid + 2.0 * ( f - 0.5 ) * ( vMax - vMid ) );

		return (int)v;
	}
}

レジストリ情報読み取ってるだけかな?

補足情報
クリック範囲、タッチ範囲、ダブルクリックの猶予時間について 補足 - kitunechan’s blog