Will be posting article on how to create simple application, with full working code in C#
And welcome to anyone who want to post their own article
Superl The Boss
- Site Admin
- Posts: 1264
- Joined: Sat Apr 16, 2011 7:49 am
- Location: Montreal, Canada
Image to a PictureBoxIntroduction:
Loading a Bitmap Image into a PictureBox from an OpenFileDialog.
public void openBMP()
//Declare the OpenFileDialog as a new OpenFileDialog.
OpenFileDialog openFileDialog = new OpenFileDialog();
//Declare the PictureBox as a new PictureBox
PictureBox picBox = new PictureBox();
//Set the openFileDialog's Filter.
openFileDialog.Filter = "Bitmap Image|*.bmp|All Files|*.*";
//Set the openFileDialog's FileName to nothing.
openFileDialog.FileName = string.Empty;
//Show the openFileDialog
if (openFileDialog.ShowDialog(this) == DialogResult.OK)
//To do code if the Open button was pressed
//Use something like:
picBox.Image = Image.FromFile(openFileDialog.FileName);
Come and say hello in here
Any donation will help click here
Have a nice day
Who is online
Users browsing this forum: No registered users and 1 guest