Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

my problem is about that i have a pannel, into this panels i create several pictureboxes with the default constructor of my class.

this is ment like that:

C#
class XY
{
public PictureBox picturebox 1;
public PictureBox picturebox2;
public Label LabelNum;

public XY(int id, int y_koordinates)
{
 picturebox 1 = new picturebox();
 //Add location etc..
 picturebox2 = new picturebox();
 // Add locations etc..
 LabelNum = new picturebox();
 //Add locations etc..
}

}


now i have from the first picturebox1, a lot of them.
The second Picturebox is ment by background image of the picturebox1, ATTENTION
i have tried picturebox1.background image, but that resizes that image and it doesnt have to do that, because the "background image" should be bigger in width as the picturebox1.

LabelNum schould be Just the ID, that the user gets more kontroll about the picturebox, it just should display the number of all picturebox.

And here comes the problem, i have tried everything, but the picturebox2 is in front of the LabelNum, so that i can see just a little bit of the number.

The picturebox1 is on start moving, so until you dont start you dont see the labels, after start its ment that you should see it.

€:
- I am very sorry for my bad explanaition but i didnt thought that this is such
a problem that everybody have to know what i exatly do.

I try now to describe it better:

Its about a dograce. You can set how much dogs are running and they get generated.
Every dog hast a picturebox in Constructor as picturebox1 so i get that much
pictureboxes like dogs.

The dogs background image is a Racetrack, is from start to the finish line long and have no funktion, its just visual like the label.
picturebox2

And the labels are just used to be for showing the Dog ID on the Racetrack, to know the running dogs ID, othervise you have to count on your own wich dog is the dog you have bet on it.

Thank you for your Help

Greets Niko
Posted
Updated 15-Nov-12 2:42am
v4

I don't thikn anyone can figure out what you're trying to do. Remember, we can't see your monitor, whats in your project, how it's coded, of read your mind.

But, it sounds as though you're using PictureBoxes for something other than what they were intended for.

I think you would be far better served by painting all these images yourself instead of wrestling with the functionality of the PictureBox control.
 
Share this answer
 
Comments
niko_tells 15-Nov-12 8:40am    
Updated Question at €:
Dave Kreskowiak 15-Nov-12 9:55am    
Yeah, ditch ALL of the PictureBoxes and just draw the images and text labels yourself.

I suggest reading up on the Graphics class and it's Draw methods.

That way, you've got complete control over what gets drawn on top and when.
Hi,

Would be a bit clear about what you are trying to achieve.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900