"L'Exception ArgumentException n'a pas été Gérée"
Salut la grande famille,
j'ai un problème avec mon picturebox
le message 'le paramètre n'est pas valide s'affiche'
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| DataSet ds = new DataSet();
adpt.Fill(ds, "client");
int c = ds.Tables["client"].Rows.Count;
if (c > 0)
{
Byte[] btpht = new Byte[0];
btpht = (Byte[])(ds.Tables["client"].Rows[c - 1]["photo"]);
MemoryStream phtosssss = new MemoryStream(btpht);
try
{
//c'est ici que le msg est affiché
pictureBox1.Image = Image.FromStream(phtosssss);// ICI LE MESSAGE EST AFFICHE
}
catch (Exception ex)
{ MessageBox.Show(ex.Message); } |