avirag
10
Posting Whiz
Recommended Answers
Jump to Postcan be something like below, check the attached project too :
Form1.cs :
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace ClearPictureBox { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private …
Jump to PostOne other way:
private void button5_Click(object sender, EventArgs e) { pictureBox1.Image = null; }
Jump to Poststick a public method on Form2 to clear the picture box:
public void ClearPictureBox() { this.PictureBox.Image = null; }
Then call the public method on Form2 from Form1.
Jump to Postsknake your obviously more pro than I but this could work out as well, right? =]
{ pictureBox1.Dispose(); }
Not really. That frees the picture box. He asked how to hide it, not destroy it. The picture box will be unavailable after you dispose it.
All 14 Replies
avirag
10
Posting Whiz
access@123
0
Newbie Poster
serkan sendur
821
Postaholic
Banned
sknake
1,622
Senior Poster
Featured Poster
pilipino93
0
Junior Poster in Training
pilipino93
0
Junior Poster in Training
pilipino93
0
Junior Poster in Training
avirag
10
Posting Whiz
sknake
1,622
Senior Poster
Featured Poster
sknake
1,622
Senior Poster
Featured Poster
pilipino93
0
Junior Poster in Training
serkan sendur
821
Postaholic
Banned
VibhorG
0
Junior Poster in Training
renjujpanicker
0
Newbie 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.