How can i apply bitmap for a button using c#.net
dilake
0
Light Poster
Recommended Answers
Jump to Postprivate void button2_Click(object sender, EventArgs e) { this.button2.BackgroundImage = Image.FromFile(@"C:\picture.bmp"); }
Jump to PostUnder your "Properties" folder in the solution explorer you will see a file called "Resources.resx". Double click on it. Then in that window click on "Add File -- Existing File" and select your image and it will embed it.
To access that image from code use
Properties.Resources.<FileName>
All 5 Replies
sknake
1,622
Senior Poster
Featured Poster
dilake
0
Light Poster
dilake
0
Light Poster
sknake
1,622
Senior Poster
Featured Poster
dilake
0
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.