473,624 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Picture Boxes

Hi

I wonder if someone can help with this, because there's something I'm
not understanding right.

I've got a List Array of PictureBoxes.

If I call PictureBoxListA rray.Clear(), and then MainForm.Invali date(),
the picture boxes remain visible on the form.

I'm not sure why!

What's the best way to get rid of them?

I've tried ((PictureBox) PictureBoxListA rray[i]).Dispose() - for each
of the picture box objects, but that seems to cause problems...

Any advice greatly appreciated!

Thanks.

Regards,

Jerry
Nov 15 '05 #1
1 1802
Jerry,

The reason for this is that you are not removing the picture box
controls from the control that is hosting them. Basically, if the boxes are
on the form, you have to do the following for each picturebox:

- Call the Remove method on the ControlCollecti on instance returned by the
Controls property.
- Remove the reference to the control from the PictureBoxListA rray.
- Call Dispose on the control (if you don't need them anymore).

Hope this helps.

"Jerry S" <je***@philosop hers.co.uk> wrote in message
news:21******** *************** *********@4ax.c om...
Hi

I wonder if someone can help with this, because there's something I'm
not understanding right.

I've got a List Array of PictureBoxes.

If I call PictureBoxListA rray.Clear(), and then MainForm.Invali date(),
the picture boxes remain visible on the form.

I'm not sure why!

What's the best way to get rid of them?

I've tried ((PictureBox) PictureBoxListA rray[i]).Dispose() - for each
of the picture box objects, but that seems to cause problems...

Any advice greatly appreciated!

Thanks.

Regards,

Jerry

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
6453
by: daimler | last post by:
help!!!!!!!! i did a for i=1 to picture1.scaleheight/2 picture1.pset (i,i) next i and the pset is shown on the picture
10
9493
by: Chris Coho, Jr. | last post by:
Ok, I'll explain the whole problem because there may be several ways to solve this and hopefully someone knows one. What I'm doing is creating a specialty template editor, similar to say a corel draw (but for specific uses). What I need to be able to do is import graphics and text and then move them around the background until they are where I want them and then export it out as an image file. The problem is that I need to be able to...
2
2553
by: beanimanius | last post by:
working with about 100 picture boxes (not very big, 42X8) 1 image list of 5 pictures hopefully 1 context menu how do you program a contex menu so that it knows what picture box you are clicking on and changes only that picture boxes picture so that you don't have to write a context menu for every single picture box. thanks
2
1368
by: Bwells | last post by:
Sorry for the legacy question (VB6) but the program I need to implement printing on has not been converted to .Net yet. I have a form with 4 Picture Boxes on it. These boxes are used as a simple means of displaying data from my database, and data regarding the connected user. I am using printform to print the form in its current state, which works well except that the contents of the
0
935
by: T Clancey | last post by:
Hi. I'm trying to put together a very simple label designer to add to a project, this will allow users to enter text data. I can DrawSting the data into the picture boxes as required, but I can't find a way to make the image permanent without first creating a graphic, saving it, then loading it into the picture box. I need the graphic in the picture box as I'm going to print the finished layout.
2
2748
swatmajor1
by: swatmajor1 | last post by:
I have been creating a basic sodoku game as a school assignment. Basically to load a puzzle, a pre-set arrangment of numbers are loaded into a hidden picture box array called "Picsolution". What I want it to do is have random picture boxes in the array "PicQuestion" equal the matching picture boxes in the "Picsolution" Array. If anyone can help me it would be very Appreciated. Swatmajor1 PS please ignore any bad spelling
1
1819
by: Jeff Williams | last post by:
I am trying to get the following to work so would like some guidance on how to achieve what I need. 1. I have a form which has a tab control. 2. On the 4th TabPage I have 5 picture boxes. 3. These picture boxes are normally populated from a file(s) with a set path and filename. I have this working
12
4105
by: akynaya | last post by:
I have several image boxes... and one picture box as a container... The problem is that... when i try to save the images.... the images doesn't appear. for the image box code i used LoadPicture
1
3576
by: orson4music | last post by:
I have two picture boxes on my form. One on top of the other. The top most picture box's movement is restricted within the picture box below making it look like the top most picture box is contained in it. The picture box at the bottom is use be my web cam to display the image video preview. I want to be able to use the top most picture box as a cropper. I that case it has to be transparent to enable the user see through to the image...
0
8240
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8175
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8680
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8625
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7168
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4177
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1487
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.