R K R K - 1 year ago 148
C# Question

ELSE IF + do nothing c#

basically I got a rectangle and I want it to stretch only to the height between -130 and 300 on the y axis. If it reaches anywhere outside the y-axis parameters it will cap at that height and do nothing. Is this possible and please let me know if you need more information.

if y coordinate = -130 to 300
then vguage = visible;
else vguage do nothing (or cap size at the Height it reaches spanning from -130(y) to 300(y));

Answer Source

Since you used pseudo code, I'm going to guess at variable names:

if(yCoord <= 300 && yCoord >= -130)
    vGauge.YCoord = yCoord;

only set your variable if the yCoord falls within a valid range.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download