Solved

Loading an image

Posted on 2006-10-28
1
163 Views
Last Modified: 2010-04-16
How would i load an image Programmatically into the forms back ground when the program starts, it will pull the image from c:\program files\blah.

How would I do this for the back ground image for a picturebox aswell?

0
Comment
Question by:schenkp
1 Comment
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 17827326
Fairly simple really, just use the static method FromFile of the Image class:

    this.BackgroundImage = Image.FromFile("Path and name of your image");

The same code will also work for a PictureBox.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C# Json POSt to Rest API 4 60
C# HTTP GET method sample code 3 57
C# Single Form 8 42
Counting connections to SQL Server through C# 3 32
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question