I use a UserControl which consists of several Buttons and 2 PictureBoxes.
If the application is in a reasonable load (recieving messages over a UDP connection) those controls a displayed as planned. On command "SetA" (PictureBoxA and ButtonA) is displayed while SetB is hidden and PictureBoxA.BackgroundImage gets updated on each TimeStep.
If under heavy load (other worker-threads) however such a command does NOT result in a immidiate correct of the displayed "SetA", only the deselected controls are hidden and the BackGround of the UserControl is shown. The correct display is coming up after "some" time. What is even more disturbing, when clicking on the position where ButtonA should be, the repective _Click routine is run??????????????
I'm using such code to command the change in display:
I don't see something like vthat on controls directly on my Form, only on the UserControl. Does anybody know the reason for that?Code:Private Sub btnActive_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnActive.Click ActiveMode = Not ActiveMode PictureBoxA.Visible = NotPictureBoxA.Visible 'either PictureBoxA or PictureBoxB is shown! PictureBoxB.Visible = Not PictureBoxB.Visible ButtonA.Visible = Not ButtonA.Visible End Sub
Aren't UserControls handled with the same priority as the other controls?




Reply With Quote