/// <summary> /// Set the margin of the TextBox to make room for the icon /// </summary> /// <param name="margin">The margin to set</param> private void SetMargin(int margin) { if (this.margin != margin) { this.margin = margin; if (owner == null) { return; } NativeShellAPI.SendMessage( this.Handle, NativeShellAPI.WM.SETMARGINS, LEFTMARGIN, new IntPtr(margin)); } }
internal static void SetSmallImageList(ListView listView) { NativeShellAPI.SendMessage(listView.Handle, NativeShellAPI.WM.LVM_SETIMAGELIST, TVSIL_SMALL, smallImageListHandle); }
internal static void SetLargeImageList(ListView listView) { NativeShellAPI.SendMessage(listView.Handle, NativeShellAPI.WM.LVM_SETIMAGELIST, TVSIL_NORMAL, largeImageListHandle); }
internal static void SetSmallImageList(TreeView treeView) { NativeShellAPI.SendMessage(treeView.Handle, NativeShellAPI.WM.TVM_SETIMAGELIST, TVSIL_NORMAL, smallImageListHandle); }