Win32Helper.cs 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. /*******************************************************************************
  2. * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
  3. * 类的信息:
  4. * 1.程序名称:Win32Helper.cs
  5. * 2.功能描述:类文件
  6. * 编辑履历:
  7. * 作者 日期 版本 修改内容
  8. * 陈晓野 2014/09/01 1.00 新建
  9. *******************************************************************************/
  10. using System;
  11. using System.Drawing;
  12. using System.Windows.Forms;
  13. namespace Dongke.IBOSS.PRD.Basics.DockPanel
  14. {
  15. public static class Win32Helper
  16. {
  17. private static readonly bool _isRunningOnMono = Type.GetType("Mono.Runtime") != null;
  18. public static bool IsRunningOnMono { get { return _isRunningOnMono; } }
  19. internal static Control ControlAtPoint(Point pt)
  20. {
  21. return Control.FromChildHandle(NativeMethods.WindowFromPoint(pt));
  22. }
  23. internal static uint MakeLong(int low, int high)
  24. {
  25. return (uint)((high << 16) + low);
  26. }
  27. }
  28. }