Hi Sir,
how to auto scroll my horizontal scroll bar when i click ok in message box ?
this is the concept of my simple game.
this is my level 1 interface, if the user get the correct answer ,dialog will appear "Correct"
when user click Ok , I want to move the Hscrollbar to show the next level.
show level 2 as below. how can i code that ?
if correct it will show messagebox and after click ok i want the scroll bar to move to 341 value to show the next LEVEL but it is not moving. please help me.
Code:private void btnGuess_Click(object sender, EventArgs e) { if (lblRemember.Text == txtAnswer.Text) { MessageBox.Show("Correct"); newhscrollbar.Value = 341; newhscrollbar.Maximum = 345; newhscrollbar.Minimum = 0; //Other condition txtAnswer.Clear(); txtAnswer.Focus(); Generator(); lblRemember.Show(); lblLevel.Text = (int.Parse(lblLevel.Text) + 1).ToString();//increase level Generator(); txtAnswer.Enabled = false; }




Reply With Quote
