Hack Forums
[C#] Displaying and Saving image to picturebox? - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C#] Displaying and Saving image to picturebox? (/showthread.php?tid=5624755)



Displaying and Saving image to picturebox? - Ram - May 16, 2017

SOLVeED SOLVeED SOLVeED SOLVeED SOLVeED SOLVeED SOLVeED SOLVeED SOLVeED SOLVeED SOLVeED SOLVeED SOLVeED SOLVeED


* - +Haze - May 16, 2017

You need to put your code to load in the form load event or constructor. When you close a form everything is disposed of.


* - AlterBlitZ - May 16, 2017

You have to bind database to the picturebox field through the option 'databindings'


* - darkdoctor - May 16, 2017

The easiest way is to use LINQ TO SQL.

Create in database if it is MSSQL, an Column with IMAGE Attribute.

And then you can use like this.

Picturebox1.image = Database.Users.Where(x=>x.username='Hackforums').firstOrDefault().Image;