G
Guest
I make gui form that contain many picturebox. (or imagebutton in MSDN)
This is program working step
0. Form has 30 picturebox
1. click some picturebox
2. processing my function (It takes time 10-20 second) and get return value
3. all picturebox visible = false;
4. check return value and show some picturebox visible = true;
but, my program stoped (no exeption) when processing picturebox "visible =
true/false"
Sample Code
private void aa()
{
int ret = myfunction();
if(ret = 0)
{
this.visibleFalseAll();
this.PB_Ctrl_01_Icon_01.Visible = true;
}
}
private void visibleFalseAll()
{
if(this.PB_Ctrl_01_Icon_01.Visible != false)
{
this.PB_Ctrl_01_Icon_01.Visible = false; // ramdom stop here, no exception
this.PB_Ctrl_01_Icon_01.Invalidate();
}
if(this.PB_Ctrl_01_Icon_02.Visible != false)
{
this.PB_Ctrl_01_Icon_02.Visible = false; // ramdom stop here, no exception
this.PB_Ctrl_01_Icon_02.Invalidate();
}
}
I can't solve this problem.
Please help me.
This is program working step
0. Form has 30 picturebox
1. click some picturebox
2. processing my function (It takes time 10-20 second) and get return value
3. all picturebox visible = false;
4. check return value and show some picturebox visible = true;
but, my program stoped (no exeption) when processing picturebox "visible =
true/false"
Sample Code
private void aa()
{
int ret = myfunction();
if(ret = 0)
{
this.visibleFalseAll();
this.PB_Ctrl_01_Icon_01.Visible = true;
}
}
private void visibleFalseAll()
{
if(this.PB_Ctrl_01_Icon_01.Visible != false)
{
this.PB_Ctrl_01_Icon_01.Visible = false; // ramdom stop here, no exception
this.PB_Ctrl_01_Icon_01.Invalidate();
}
if(this.PB_Ctrl_01_Icon_02.Visible != false)
{
this.PB_Ctrl_01_Icon_02.Visible = false; // ramdom stop here, no exception
this.PB_Ctrl_01_Icon_02.Invalidate();
}
}
I can't solve this problem.
Please help me.