Rectangle GetWindowRectangle() { if (__handle == IntPtr.Zero) { return(new Rectangle()); } return(Win32ApiHelper.GetWindowRectangle(__handle)); }
private void OnVolumeChange(object obj, MouseEventArgs args) { if (args.Delta > 0) { Win32ApiHelper.VolumeUp(Handle); } else { Win32ApiHelper.VolumeDown(Handle); } }
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)); }
public void SetAsParentOf(Form form) { Win32ApiHelper.SetWindowAttributes(form.Handle, (int)GWL.GWL_STYLE, (int)WS.WS_CHILD); Win32ApiHelper.SetParentWindow(form.Handle, __handle); }
private void OnVolume(object obj, ClickEventArgs args) { Win32ApiHelper.Mute(Handle); }