Esempio n. 1
0
            /// <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));
                }
            }
Esempio n. 2
0
 internal static void SetSmallImageList(ListView listView)
 {
     NativeShellAPI.SendMessage(listView.Handle, NativeShellAPI.WM.LVM_SETIMAGELIST, TVSIL_SMALL, smallImageListHandle);
 }
Esempio n. 3
0
 internal static void SetLargeImageList(ListView listView)
 {
     NativeShellAPI.SendMessage(listView.Handle, NativeShellAPI.WM.LVM_SETIMAGELIST, TVSIL_NORMAL, largeImageListHandle);
 }
Esempio n. 4
0
 internal static void SetSmallImageList(TreeView treeView)
 {
     NativeShellAPI.SendMessage(treeView.Handle, NativeShellAPI.WM.TVM_SETIMAGELIST, TVSIL_NORMAL, smallImageListHandle);
 }