代码如下:

[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
        private static extern Int32 SendMessage(IntPtr hwnd, Int32 wMsg, Int32 wParam, Int32 lParam);

        const int LVM_FIRST = 0x1000;
        const int LVM_SETICONSPACING = LVM_FIRST + 53;

        /// <summary>
        /// 设置图标间隔
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        public void SetSpacing(Int16 x, Int16 y)
        {
            SendMessage(this.lvZhuType.Handle, LVM_SETICONSPACING, 0, x * 65536 + y);
            this.lvZhuType.Refresh();
        }

 

相关文章:

  • 2021-12-29
  • 2022-12-23
  • 2021-11-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-30
  • 2022-12-23
相关资源
相似解决方案