C#操作窗口类(句柄操作).docxVIP

  • 41
  • 0
  • 约4.37千字
  • 约 14页
  • 2020-08-30 发布于天津
  • 举报
实现过程: 过程一:找到当前鼠标位置的句柄 您的使用2个WinAPI (俺喜欢自己封装下来用): ViewCode [Dlllmport( ,EntryPoint= GetCursorPos )] publicstaticexternbool GetCursorPos( out Pointpt); [DllImport( ,EntryPoint= WindowFromPoint )] publicstaticextern In tPtrWi ndowFromPoi nt(Poi ntpt); 田日田日田E n dexOf; } publicoverridestri ng ToStri ng() { Stri ngBuilderresult= n ewStri ngBuilder(); for (WinHWNDwinHandle= this ;winHandle!= null ;winHandle= { ({0}:{1}; ‘Escape, if ==- 1) break ; } ().TrimE nd( ;); privatestaticstri ng { stri ng []sMarks=(; return sMarks[].Split( } privatestaticstri ng { stri ng []sMarks=(; stri ng []sChildMarks= f

文档评论(0)

1亿VIP精品文档

相关文档