ITE208-24-06-51
วันนี้เรียน
?1. ฟอร์มแบบสอบถาม (ลักษณะข้อสอบ)
?2. ฟอร์มเปลี่ยนสี
3. Switch..case
?Switch(variable)
{
???????? case?”condition” :
????????????? xxxx …
??????????????break;
?????????case “condition2″ :
????????????? xxxx …
??????????????break;
????????? default :
??????????????xxxx…
??????????????break;
}?
?4. for…
?
การบ้าน
?1. ทำ เครื่องคิดเลข โดยเพิ่ม + - * / mod(หารเอาเศษ) diff(หารเอาส่วน) ^(.Pow)
2. if..else.. > messageBox (ฟอร์มแบบสอบถาม)
private void button1_Click(object sender, EventArgs e)
?{
?
?
?
DialogResult resp = MessageBox.Show(“คุณเคยใช้งานอีเมลหรือไม่?”, “E-mail”,MessageBoxButtons.YesNo);
??if (resp == DialogResult.Yes)
?{
?
resp =
?
MessageBox.Show(“เคยพบอีเมล์ขยะหรือไม่?”, “Spam ?”, MessageBoxButtons.YesNo);
?if (resp == DialogResult.Yes)
?
{
?
?
MessageBox.Show(“แนะนำให้คุณใช้โปรแกรม SpamKiller”);
?
}
?
?
else
?
{
?
?
MessageBox.Show(“คุณควรติดตั้ง โปรแกรมป้องกันสแปมเมล์ไว้ด้วย”);
?
}
}
?
else
?{
?MessageBox.Show(“คุณน่าจะทดลองใช้อีเมล์บ้า้งนะครับ “, “Oh!”);
?}
?}
?



