alternetsoft / AlternetUI

MIT License
22 stars 2 forks source link

Problem to show image in PictureBox #76

Closed neoxeo closed 8 months ago

neoxeo commented 8 months ago

@generalloki

Version : 898ff27b464fd02ebd79bb3a3f73da4953de369e

Code :

private void button2_Click(object? sender, EventArgs e)
{
    pictureBox1.Image = Image.FromStream(streamFromFile("AlternetSoft.png"));
    pictureBox2.Image = Bitmap.FromStream(streamFromFile("AlternetSoft.png"));
}

public FileStream streamFromFile(string filename)
{
    FileStream stream = File.OpenRead(filename);
    return stream;
}

I try with Image or Bitmap but same result.

No error but no image is present in pictureBox.

EDIT : if I reduce my Windows in taskbar and show it again, picturebox image is present

neoxeo commented 8 months ago

Thanks. I will test it in 1 or 2 hours.

neoxeo commented 8 months ago

Tests are OK : thanks !!!