I'm trying to set the image of an UltraPictureBox dynamically through code when I click on a buttton but it won't show the image. Is there something I am forgetting? I have tried update, refresh, etc...
Thanks.
How are you setting the image? Are you sure that the image is actually being loaded? Does this work with the .NET PictureBox? I just tried this out through a button click and didn't really have any trouble; as a simplified test, I created the image in code:
private void button1_Click(object sender, EventArgs e){ Bitmap bmp = new Bitmap(300, 300); using (Graphics g = Graphics.FromImage(bmp)) { g.FillRectangle(Brushes.Red, new Rectangle(Point.Empty, bmp.Size)); } this.ultraPictureBox1.Image = bmp;}
-Matt