title: How to display image from mysql to my program visual c++?
body: <p>I'm write this code. It show error message (parameter is not valid)
  How can solve it?</p>
  
  <pre><code> String^ con=L"datasource=localhost; port=3306;username=root; password=411126;";
               MySqlConnection ^ conn=gcnew MySqlConnection(con);
               MySqlCommand^ cmd=gcnew MySqlCommand("select img from info.images where id='"+textBox1-&gt;Text+"'",conn);
               MySqlDataReader^re;
               try{
                   conn-&gt;Open();
                   re=cmd-&gt;ExecuteReader();
                   [![enter image description here][1]][1]re-&gt;Read();
                   BinaryFormatter^fe=gcnew BinaryFormatter();
                   BinaryFormatter();
                   MemoryStream^ms=gcnew MemoryStream();
                   fe-&gt;Serialize(ms,re["img"]);
                   array&lt;Byte&gt;^arr =ms-&gt;ToArray();
                   MemoryStream^ms2=gcnew MemoryStream(arr);
                   pictureBox1-&gt;Image=Image::FromStream(ms2);
               }
               catch(Exception^ex){
                   MessageBox::Show(ex-&gt;Message,"ERROR");
               }
  </code></pre>