C#标签BringToFront() [英] C# Label BringToFront()

查看:292
本文介绍了C#标签BringToFront()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的问题是我有一个面板,在该面板中我使用班级的默认构造函数创建了几个图片框.

就像这样:



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:

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..
}

}



现在我有了第一个picturebox1,其中有很多.
第二个Picturebox是按PictureBox1的背景图像进行修改的,注意
我已经尝试了picturebox1.background图片,但是它会调整图片的大小,而不必这样做,因为"background image"的宽度应与picturebox1一样大.

LabelNum应该只是用户的ID,以便用户了解更多有关图片框的信息,它只应显示所有图片框的编号.

问题来了,我已经尝试了所有方法,但是picturebox2位于LabelNum的前面,这样我就可以看到其中的一小部分.

picturebox1即将开始移动,因此,直到您不开始就看不到标签,开始阅读后,您应该会看到它.

€:
-很抱歉我的解释不好,但是我没想到这是
每个人都必须知道我该做什么的问题.

我现在尝试更好地描述它:

它关于狗狗.您可以设置正在运行的狗的数量,并生成它们.
每只狗在Constructor中都有一个picturebox作为picturebox1,所以我得到了很多
像狗一样的图片框.

狗的背景图像是一个赛马场,从起点到终点线很长,没有任何功能,就像标签一样直观.
picturebox2

标签只是用来在赛马场上显示Dog ID,知道跑步狗的ID,否则您必须依靠自己的狗来打赌.

谢谢您的帮助

问候Niko



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

推荐答案

我不认为任何人都可以弄清楚您要做什么.记住,我们看不到您的监视器,您的项目中的内容,代码的编码方式以及您的想法.

但是,听起来好像您正在使用PictureBoxes而不是它们原本打算的.

我认为,最好自己绘画所有这些图像,而不是去使用PictureBox控件的功能.
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.


您好,

您将要实现的目标会有所清楚.
Hi,

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


这篇关于C#标签BringToFront()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆