R
ReaanB
For some reason, the following line won't work as expected:
int r = ClientRectangle.Right - (VerticalScroll.Visible ?
SystemInformation.VerticalScrollBarWidth : 0);
I placed it in the Click event handler of a new button on an empty
form in a new project. Intellisense evaluates the expression
correctly, but when I inspect the variable after the line is executed,
its value is 0.
The following works as expected:
int r1 = ClientRectangle.Right;
int r2 = (VerticalScroll.Visible ?
SystemInformation.VerticalScrollBarWidth : 0);
int r = r1 - r2;
int r = ClientRectangle.Right - (VerticalScroll.Visible ?
SystemInformation.VerticalScrollBarWidth : 0);
I placed it in the Click event handler of a new button on an empty
form in a new project. Intellisense evaluates the expression
correctly, but when I inspect the variable after the line is executed,
its value is 0.
The following works as expected:
int r1 = ClientRectangle.Right;
int r2 = (VerticalScroll.Visible ?
SystemInformation.VerticalScrollBarWidth : 0);
int r = r1 - r2;