c# - Why does the menu strip white out when subscribing to a picture box paint event? -
I have a form with causes the to assign any drawing instead of specifying MenuStrip and PictureBox . I subscribe to PictureBox from Paint event with the following code:
Private Zero ImageBox 1_Paint (Object Sender, PaintEventArgs e) {pictureBox1 . Image = new bitmap (picture box 1. wide, picture box 1.high); // Other code but above line reflects the problem} menu strip to be white - I do not see the text till then I can move around it - even if PictureBox Menu does not overlap at all at the end of the above function I menuStrip1.Update () I can put it, but this can lead to other problems. PictureBox Use the PaintEventArgs .
Private Zero PictureBox 1_Paint (Object Sender, PaintEventArgs e) {e.Graphics.Clear (Color.Gray); }
Comments
Post a Comment