G
Guest
Background:
My GUI has multiple screens but only one is visible at a time so when I
change screens I hide the first one and show the second one. There are many
elements on each screen that need to be updated and this is done in a
separate update thread that is shared between the screens. Each screen has
an update function and when the screen is switched I call the new update
function the next iteration of the update thread.
1) Is there any reason why I can’t update a GUI element on a screen that is
hidden? I get an ObjectDisposedException when I try to this. The control’s
hwnd still exists so I don’t see what the problem is. Right now I just catch
and ignore this exception.
2) What can block an Invoke((MethodInvoker)delegate() call? Sometimes when
I’m switching screens my thread will freeze and in the debugger I can see it
is stuck on this line.
Thanks,
Jeff
My GUI has multiple screens but only one is visible at a time so when I
change screens I hide the first one and show the second one. There are many
elements on each screen that need to be updated and this is done in a
separate update thread that is shared between the screens. Each screen has
an update function and when the screen is switched I call the new update
function the next iteration of the update thread.
1) Is there any reason why I can’t update a GUI element on a screen that is
hidden? I get an ObjectDisposedException when I try to this. The control’s
hwnd still exists so I don’t see what the problem is. Right now I just catch
and ignore this exception.
2) What can block an Invoke((MethodInvoker)delegate() call? Sometimes when
I’m switching screens my thread will freeze and in the debugger I can see it
is stuck on this line.
Thanks,
Jeff