how to keep track of previous value before changing it in vb.net -
private sub chkloop_checkedchanged(sender object, e eventargs) handles chkloop.checkedchanged intvalue1 = nudx4.value intvalue2 = nudy4.value dim g triglib.triglib = new triglib.triglib ' make shape closed making last point same first point. if chkloop.checked nudx4.value = nudx1.value nudy4.value = nudy1.value lblarea.text = "area: " & cint(g.areatriangle(new point(nudx1.value, nudy1.value), new point(nudx2.value, nudy2.value), new point(nudx3.value, nudy3.value))) elseif chkloop.checkstate = checkstate.unchecked nudx4.value = intvalue1 nudy4.value = intvalue2 lblarea.text = ""
i trying store previous values of point nudx4 , nudy4 in 2 local variable. when uncheck checkbox values of nudx4 , nudy4 remain equal values of nudx1 , nudy1 instead of changing previous values.
please help.
private sub chkloop_checkedchanged(sender object, e eventargs) handles chkloop.checkedchanged if chkloop.checked ... intvalue1 = nudx4.value intvalue2 = nudy4.value elseif chkloop.checkstate = checkstate.unchecked nudx4.value = intvalue1 nudy4.value = intvalue2 ...
Comments
Post a Comment