Rank: มือสมัครเล่น Groups: Member
Joined: 6/22/2008 Posts: 15 Location: Thailand
|
ComboBox ของผม มี Item ดังนี้ครับ
5 วินาที
10 วินาที
20 วินาที
ไม่ทราบว่าเราจะแยกส่วนของ ตัวเลขเพื่อใช้ในการคำนวณ จากข้อความว่า วินาทีได้อย่างไร
ช่วยหน่อยนะครับ
|
Rank: มือสมัครเล่น Groups: Member
Joined: 6/26/2008 Posts: 16 Location: thailand
|
|
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox1.SelectedIndex == 0)
{
MessageBox.Show("5 วินาที");
}
else if (comboBox1.SelectedIndex == 1)
{
MessageBox.Show("10 วินาที");
}
else if (comboBox1.SelectedIndex == 2)
{
MessageBox.Show("15 วินาที");
}
}
|
|