Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
How to load a different image to a picture box on click event
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Prasadi
11y
1.9k
1
Reply
Hi,
Im developing a game using c sharp. For that i want to know how to change the default picture box image in to another image on click event. When the user click on the picture box should display another image. Then it should disable the picture box so no body else can click on it again.
this is the code i have done
private void Game_Logic(int tossnum)
{
bool flag = false;
if (tossnum != 0)
{
if (this.pictureBox1.Click == true)
{
pictureBox1.Image = new Bitmap("C:\\Users\\pchathurani\\Documents\\Visual studio My projects\\Game\\Game\\images\\player_one.png");
flag = true;
}
}
}
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Role manager in Asp.Net
I want to study the crystal report?