Esempio n. 1
0
 public void Dispose()
 {
     if (_attached)
     {
         User32APIs.AttachThreadInput(_attachThreadId, _attachToThreadId, false);
     }
 }
Esempio n. 2
0
        public AttachThreadInputScope(uint threadId)
        {
#pragma warning disable CS0618 // Type or member is obsolete
            _attachThreadId = (uint)AppDomain.GetCurrentThreadId();
#pragma warning restore CS0618 // Type or member is obsolete

            _attachToThreadId = threadId;
            _attached         = User32APIs.AttachThreadInput(_attachThreadId, _attachToThreadId, true);
        }