Group: StrataFrame Users
Posts: 50,
Visits: 163
|
One last question. On my form where the picture displays, I have a button to load a different picture into the PictureBox and that works. But when I SAVE it doesn't save and I get no error. Keeps the original picture. Here is the code you provided that I used:
[Browsable(false), BusinessFieldDisplayInEditor(), Description("GIpicture"), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public System.Drawing.Bitmap GI_PICTURE { get { object value = this.CurrentRow["GI_PICTURE"]; if(value is byte[]) { return new System.Drawing.Bitmap(new System.IO.MemoryStream((byte[])value)); } else { return new System.Drawing.Bitmap(1, 1); } } set { System.IO.MemoryStream ms = new System.IO.MemoryStream(); value.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp); this.CurrentRow["GI_PICTURE"] = ms.ToArray(); } }
|