RaUI/Source/ryControls/WeifenLuo.WinFormsUI/Docking/Helpers/Win32Helper.cs
zilinsoft 3262955f2f ### 2023-11-07更新
------
#### RaUIV4    V4.0.2311.0701
- *.[全新]整合了MyDb、ryControls、MyDb_MySQL等dll文件到RaUI一个项目。
- *.[新增]新增ApkOp类,可以轻松获取APK信息。
- *.[新增]新增JsonExt扩展类,让Json操作更简单。
- *.[新增]新增WebP类,可以支持webp格式的图片。
- *.[改进]ryQuickSQL中的AddField方法改为自动替换已存在的同名值。
- *.[修复]ryQuickSQL中的AddFieldCalc方法无法正常计算的BUG。
2023-11-07 16:37:53 +08:00

35 lines
1.0 KiB
C#

using System;
using System.Drawing;
using System.Windows.Forms;
namespace WeifenLuo.WinFormsUI.Docking
{
/// <summary>
///
/// </summary>
public static class Win32Helper
{
private static readonly bool _isRunningOnMono = Type.GetType("Mono.Runtime") != null;
/// <summary>
///
/// </summary>
public static bool IsRunningOnMono { get { return _isRunningOnMono; } }
internal static Control ControlAtPoint(Point pt)
{
return Control.FromChildHandle(NativeMethods.WindowFromPoint(pt));
}
internal static uint MakeLong(int low, int high)
{
return (uint)((high << 16) + low);
}
internal static uint HitTestCaption(Control control)
{
var captionRectangle = new Rectangle(0, 0, control.Width, control.ClientRectangle.Top - control.PointToClient(control.Location).X);
return captionRectangle.Contains(Control.MousePosition) ? (uint)2 : 0;
}
}
}