Esempio n. 1
0
        Rectangle GetWindowRectangle()
        {
            if (__handle == IntPtr.Zero)
            {
                return(new Rectangle());
            }

            return(Win32ApiHelper.GetWindowRectangle(__handle));
        }
Esempio n. 2
0
 private void OnVolumeChange(object obj, MouseEventArgs args)
 {
     if (args.Delta > 0)
     {
         Win32ApiHelper.VolumeUp(Handle);
     }
     else
     {
         Win32ApiHelper.VolumeDown(Handle);
     }
 }
Esempio n. 3
0
        public static Win32Window FindWindowByRelationTree(IEnumerable <string> tree)
        {
            IntPtr handleToNext = IntPtr.Zero;

            foreach (string treeNode in tree)
            {
                handleToNext = Win32ApiHelper.FindWindowByClassName(handleToNext, treeNode);
                if (handleToNext == IntPtr.Zero)
                {
                    return(new Win32Window(IntPtr.Zero));
                }
            }

            return(new Win32Window(handleToNext));
        }
Esempio n. 4
0
 public void SetAsParentOf(Form form)
 {
     Win32ApiHelper.SetWindowAttributes(form.Handle, (int)GWL.GWL_STYLE, (int)WS.WS_CHILD);
     Win32ApiHelper.SetParentWindow(form.Handle, __handle);
 }
Esempio n. 5
0
 private void OnVolume(object obj, ClickEventArgs args)
 {
     Win32ApiHelper.Mute(Handle);
 }