성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] Get Started with Milvus Vector DB i...
[정성태] cyberark/PipeViewer - A tool that...
[정성태] WinForms in a 64-Bit world – our st...
[정성태] 예제에서 SELECT_SQL도 내부적으로는 SqlCommand/...
[victor] SELECT_LINQ SELECT_SQL 같은 쿼리인...
[victor] 답변 갑사합니다. 예외(Exception)가 났습니다. ...
[정성태] 일단, 위의 방식대로 하면 예외(Exception) 없이 잘 동...
[정성태] Windows 10 (버전 1809)에 이런 기능이 ^^ 추가되...
[정성태] pde windbg extension ; https://lea...
[정성태] // GetEnumerator extensions for Ran...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
닷넷
.NET 3.0
.NET 3.5
.NET 4.0
COM 개체 관련
Win32
Vista
Windows 7
Windows 8
Windows 서버
데이터베이스
웹폼 코딩 규약
윈폼 코딩 규약
공통 코딩 규약
명령행
레지스트리
기타
부모글 보이기/감추기
내용
The managed way to retrieve text under the cursor (mouse pointer)<br /> ; http://blogs.msdn.com/b/oldnewthing/archive/2013/04/08/10409196.aspx<br /> <br /> <br /> ///////////////////////////////////////////////////////////////<br /> <pre> using System; using System.Windows; using System.Windows.Forms; using System.Windows.Automation; class Program { static Point MousePos { get { var pos = Control.MousePosition; return new Point(pos.X, pos.Y); } } public static void Main() { for (;;) { AutomationElement e = AutomationElement.FromPoint(MousePos); if (e != null) { foreach (var prop in e.GetSupportedProperties()) { object o = e.GetCurrentPropertyValue(prop); if (o != null) { var s = o.ToString(); if (s != "") { var id = o as AutomationIdentifier; if (id != null) s = id.ProgrammaticName; Console.WriteLine("{0}: {1}", Automation.PropertyName(prop), s); } } } foreach (var pattern in e.GetSupportedPatterns()) { Console.WriteLine("Pattern: {0}", Automation.PatternName(pattern)); } Console.WriteLine(); } System.Threading.Thread.Sleep(1000); } } } </pre>
첨부파일
스팸 방지용 인증 번호
2028
(왼쪽의 숫자를 입력해야 합니다.)