如何在父母的中心打开子表单 [英] How To Open Child form in center of parent
问题描述
请帮帮我,
i有两种形式
1)主表格
2)儿童表格(显示进度GIF图像一段时间)
拨打儿童表格我使用过主题:
Thread ProgressT = null;
public Progress frm = null;
Hi,
Please help me ,
i have two form
1) Main Form
2) Child Form (Showing progress GIF image for some time)
To call child form i have used thread :
Thread ProgressT = null;
public Progress frm = null;
ProgressT = new Thread(ProgressViewTest);
ProgressT.IsBackground = true;
ProgressT.Start();
//致电ProgressViewTest
// Call ProgressViewTest
void ProgressViewTest()
{
try
{
if (frm == null)
frm = new Progress();
if (frm.Visible == true)
frm.Close();
frm.ShowDialog();
}
catch (Exception ex)
{
if (frm != null)
{
if (frm.Visible == true)
frm.Close();
}
}
}
如何打开孩子在父母的中心形式。
在此先感谢。
[代表OP]
谢谢,
i我没有隐藏一张表格的一部分在另一张表格后面
$ b第二种形式的$ b我使用了一个GIF图像来显示用户等待一段时间,因为某些进程正在后端进行。所以从第一种形式的胎面形成2(GIF图像)。 aand我想在父母的中心制作那个表格。
[/ updated]
推荐答案
首先,你的表格不是彼此的孩子和父母(除非他们是MDI父母和MDI孩子)。儿童与家长的关系已经不再用于表格。
这个问题没有特殊的解决方案。您只需要使用属性位置
和大小
来表示一个表单的表单和设置位置在另一个中间。 (但是为什么你会把一个表格的一部分隐藏在另一个表格的后面?你确定这是可以接受的UI设计吗?)
-SA
First, your form are not child and parent to each other (unless they are MDI parent and MDI child). Child-parent relationship is made defunct for forms.
There is no special solution for this "problem". You simply need to use the propertyLocation
andSize
for both form and set location of one form the way it is placed in the middle of another one. (But why would you hide a part of one form behind another one? are you sure this would be acceptable UI design?)
—SA
谢谢,
i我没有隐藏另一个表格背后的一个表格的一部分
on第二种形式我使用了一个GIF图像来显示用户等待一段时间,因为某些进程在后端进行。所以从第一种形式的胎面形成2(GIF图像)。我想把这个表格放在父母的中心。
Thanks,
i am not hiding a part of one form behind another form
on second form i have used one GIF image to show user to wait for some time, because some process going on at backend. so form 2 (GIF image) call by tread from first form. aand i want to make that form in center of parent.
我没有隐藏一个另一种形式背后的一种形式的一部分
在第二种形式上我使用了一个GIF图像来向用户显示等待一段时间,因为某些进程正在后端进行。所以从第一种形式的胎面形成2(GIF图像)。我想把这个表格放在父母的中心。
i am not hiding a part of one form behind another form
on second form i have used one GIF image to show user to wait for some time, because some process going on at backend. so form 2 (GIF image) call by tread from first form. aand i want to make that form in center of parent.
这篇关于如何在父母的中心打开子表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!