Hi to all of you.I am totaly newbie in c# Visual studio.
ok here is the my problem
i must for homework do next.
i have 5 text box on form.a,b,c,d,e
in all of them i only must type NUMERIC format not letters.
now i must do next
mathematic > b/a = M
d/c= N
and then automaticly must show in e this result.
e=(1-(N/M))*100
can you understand my problem and can you please help me.
thank you. and sorry about bad english,
Loading

Aleksandar IlioskiRank #9,295 · 208 reputationPosted Mar 22, 2009, 5:57 AM EDT
Marin Jurca9 reputationPosted Mar 23, 2009, 6:50 AM EDT
thanks for answer.
here is the ss
http://img160.imagevenue.com/img.php?image=23219_kako_122_1103lo.JPG
Aleksandar IlioskiRank #9,295 · 208 reputationPosted Mar 25, 2009, 7:18 AM EDT
Marin Jurca9 reputationPosted Mar 25, 2009, 7:58 AM EDT
a = 16
b = 42
c = 17
d = 41
result in textbox.5 must be 8.12 %
Aleksandar IlioskiRank #9,295 · 208 reputationPosted Mar 25, 2009, 1:28 PM EDT
Marin Jurca9 reputationPosted Mar 28, 2009, 3:37 AM EDT
my program is working.
Aleksandar IlioskiRank #9,295 · 208 reputationPosted Mar 28, 2009, 7:47 AM EDT
Marin Jurca9 reputationPosted Mar 28, 2009, 8:52 AM EDT
i must sqrt finish result?
how to do that?
Aleksandar IlioskiRank #9,295 · 208 reputationPosted Mar 29, 2009, 4:16 AM EDT
result = (1-(N/M)*100;// old code
result = Math.Sqrt(result);// new code
textBox5.Text = result.ToString();// old code that is all
Rachit PatelRank #1,923 · 763 reputationPosted May 4, 2009, 4:33 AM EDT
Below function help your enter only decimal value in textbox.
/*****************************************************************************
10.This function is used to Check for Currency entry in Textbox/Textarea/select box for the Empty,
Maximum value
Note1:If Required is set to false,then it validates only if you enter in the
input boxes.
Ex: fnCheckCurrency("document.frmAddEdit.txtCurrency","Amount","99999999.99",true);
******************************************************************************/
/************************ UPDATED BY CHITAL ON 31st October, 2006 ****************************/
function fnCheckCurrency(ObjectName,ObjectCaption,MaxVal,Required){
var strErr = ""
ObjectName=eval(ObjectName)
if(ObjectName.value.substring(0,1) == "$")
{
ObjectName.value=ObjectName.value.substring(1,ObjectName.length);
}
if(ObjectName.value == "0.00"){
l = 0;
}else{
l = ObjectName.value.length;
}
if (Required==true ||(Required==false && l>0)){
if(ObjectName.value.length <=0)
{
ObjectName.value=0;
}
else
{
var curEntered = ObjectName.value;
if (isNaN(curEntered)||fnIsEmpty(curEntered)){
strErr = ObjectCaption + " " + strErrValidCurrency + " \n\ " ;
}
else if (curEntered < 0){
strErr = ObjectCaption + " " + strErrNegativeValue + " \n\ " ;
}
else{
curEntered = parseFloat(curEntered)
if (curEntered > MaxVal){
strErr = ObjectCaption + " " + strErrExceed + " " + MaxVal + " \n\ " ;
}
}
}
if (strErr != ""){
strErrMessage = strErrMessage + strErr;
if ((objFocus == undefined)||(objFocus == "")){
objFocus = ObjectName
}
}
}else{return true;}
}