ba slm
goftam manam ye amozesh bezaram(hade aqal bara taze kara)
ba in code mitonin ye ramz bara ye qesmat az soft bezarin
aval ye button mizarin va ye textbox
button :
name : btnOK
text : OK
Enable : fals
TextBox :
name : txtSecurity
bad ham ye string migirim be name : strSecurity
meqdaresho khodeton mizarin
hamon ramzi ke mikhayn bezarin man ramz : 123456
mizaram
bad to evente txtSecurity Changed migim :
hala mitonin dastore if ro harchi ke mikhayn bezarin
masalan ye form baz she
ye MessageBox baz beshe
ya Back color sabz she
harchi ke bekhayn
movafaq bashin
goftam manam ye amozesh bezaram(hade aqal bara taze kara)
ba in code mitonin ye ramz bara ye qesmat az soft bezarin
aval ye button mizarin va ye textbox
button :
name : btnOK
text : OK
Enable : fals
TextBox :
name : txtSecurity
bad ham ye string migirim be name : strSecurity
meqdaresho khodeton mizarin
hamon ramzi ke mikhayn bezarin man ramz : 123456
mizaram
bad to evente txtSecurity Changed migim :
- Code:
private void txtSecurity_TextChanged(object sender, EventArgs e)
{
string Security = "123456";
if (txtSecurity.Text == Security)
{
btnOK.Enabled = true;
}
else
{
btnOK.Enabled = false;
}
}
hala mitonin dastore if ro harchi ke mikhayn bezarin
masalan ye form baz she
ye MessageBox baz beshe
ya Back color sabz she
harchi ke bekhayn
movafaq bashin