I am trying to size a listview column based on the width of the listview. I can use a 5 to compensate for the width of the separator as shown below but I would prefer not to hard code the 5. Is there a way to determine the width of the the column separator?
Code:
if (this.lvwUserList.Items.Count > 0)
{
    if ((GetWindowLong(this.lvwUserList.Handle, GWL_STYLE) & WS_VSCROLL) != 0)
    {
        this.lvwUserList.Columns[0].Width = this.lvwUserList.Width - SystemInformation.VerticalScrollBarWidth - 5;
    }
    else
    {
        this.lvwUserList.Columns[0].Width = this.lvwUserList.Width - 5;
    }
}
Thanks Steve