1
private void button1_Click(object sender, EventArgs e)
        {
            mtp1Start = myTrackPanelss1.Start;
            mtp1End = myTrackPanelss1.End;           
            button1.Enabled = false;
            Animation_Radar_Preview ap = new Animation_Radar_Preview();
            ap.FormClosing += new FormClosingEventHandler(ap_FormClosing);
            ap.Show();
        }

我希望表单ap将继续显示,即使我点击它后面表单上的其他按钮。我有一个大表格,当我单击此按钮时,会打开一个较小的表格。我希望ap当我单击大表格时,较小的表格将继续显示在原位,这样较小的表格就不会移动到大表格的后面。

4

2 回答 2

2

Form.TopMost属性设置为true

ap.TopMost = true;
ap.Show();
于 2014-05-08T12:11:26.447 回答
1

try to show like this,

Animation_Radar_Preview ap = new Animation_Radar_Preview();
ap.FormClosing += new FormClosingEventHandler(ap_FormClosing);
ap.Show(this);

Assign the parameter this in Show() method. it will set the current form as a owner of child(ap).

于 2014-05-08T12:01:31.350 回答