private void btnPhoto_Click(object sender, EventArgs e) { MyUtils myUtils = new MyUtils(); string sPath = myUtils.PhotoPath(); if (sPath != string.Empty) { byte[] img = myUtils.GetPhoto(sPath); MemoryStream ms = new MemoryStream(); ms.Write(img, 0, img.Length); Image imgPhoto = Image.FromStream(ms); pbxLogo.Image = imgPhoto; tbxPhoto.Text = sPath; } }
private void pictureBox1_DoubleClick(object sender, EventArgs e) { MyUtils myUtils = new MyUtils(); string sPath = myUtils.PhotoPath(); if (sPath != string.Empty) { byte[] img = myUtils.GetPhoto(sPath); MemoryStream ms = new MemoryStream(); ms.Write(img, 0, img.Length); Image imgPhoto = Image.FromStream(ms); pictureBox1.Image = imgPhoto; pictureBox1.Text = sPath; btnOK.Enabled = true; newPic = true; } }