my program go like this:
Creating a seperate thread. In that thread I creates new panels:
//outside the thread :
MakeNewPanel=True; //global
while (MakeNewPanel==True) {}
creating new commandbotton ctrl
//Thread:
while(1)
{
processsystemevents()
processdrawevents()
if (MakeNewPanel == True){
creating new panel ()
MakeNewPanel=False}
//other actions on the panels
}
now, when im pressing the cmd botton it remain pressed when it actually not, it the "draw on the screen" that havn't updated, or when the cmd botton is transparent (and its label )when im pressing it a little frame around the label remain in the screen. I tried to put
processsystemevents()
processdrawevents()
almost every where, now its like the above.
Thank u Very much.