コード例 #1
0
        public void SelectGroup(GroupSelection group)
        {
            if (_myMethod.Equals(AutomationMethods.SendMessage))
            {
                Interop.SendMessage(_myHandle, (uint)Interop.WMessages.Keydown, (IntPtr)group, IntPtr.Zero);
                Interop.SendMessage(_myHandle, (uint)Interop.WMessages.Keyup, (IntPtr)group, IntPtr.Zero);
            }

            else if (_myMethod.Equals(AutomationMethods.PostMessage))
            {
                Interop.PostMessage(_myHandle, (uint)Interop.WMessages.Keydown, (IntPtr)group, IntPtr.Zero);
                Interop.PostMessage(_myHandle, (uint)Interop.WMessages.Keyup, (IntPtr)group, IntPtr.Zero);
            }
        }
コード例 #2
0
        public void PerformCompleteKeypress(Keys key)
        {
            if (_myMethod.Equals(AutomationMethods.SendMessage))
            {
                Interop.SendMessage(_myHandle, (uint)Interop.WMessages.Keydown,
                                    (IntPtr)key, IntPtr.Zero);

                Interop.SendMessage(_myHandle, (uint)Interop.WMessages.Keyup,
                                    (IntPtr)key, IntPtr.Zero);
            }



            else if (_myMethod.Equals(AutomationMethods.PostMessage))
            {
                Interop.PostMessage(_myHandle, (uint)Interop.WMessages.Keydown,
                                    (IntPtr)key, IntPtr.Zero);

                Interop.PostMessage(_myHandle, (uint)Interop.WMessages.Keyup,
                                    (IntPtr)key, IntPtr.Zero);
            }
        }