TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Chetan Navale
1.7k
32
7.1k
To provide image path in winforms application
Apr 28 2012 1:31 PM
Hi,
I am creating an windows forms application, in which I wish to give image path to button to change its image on an event. I have tried doing it in the way below:
btnSave.Image = Image.FromFile(@"..\Images\Buttons\updateblkbutton.png");
while compiling it wont gives me any error but when I run it it will terminate giving an error of filenotfoundexception. Here Images is the folder inside my application folder. When I provide hard path (Full path along with Drive name and all folder names) insted of thoes dots it will run without any erros.
Can some let me know what should I need to change in the above line so that it will run correctly.
Reply
Answers (
1
)
Excel
Excel