让一个窗体在这个程序的所有窗体的上面 让一个窗体在这个程序的所有窗体的上面 但是又不能像topMost=true后的那样 在所有程序的最上面显示 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 using System.Runtime.InteropServices; [DllImport("user32")] public static extern int SetParent(int hWndChild, int hWndNewParent); //temp2是你的子form temp2.MdiParent = this; temp2.Show(); SetParent((int)temp2.Handle, (int)this.Handle); showmodeldialog();或者是窗体.ToMost=true; http://topic.csdn.net/u/20100320/14/20d666ce-f355-4335-a0a8-73df5fa23f82.htmlprivate void Form1_Activated(object sender, EventArgs e){ foreach( Form frm in System.Windows.Forms.Application.OpenForms) { if (frm is Form2) frm.BringToFront(); }} C#.net IIS 发布网站的问题 TrimEnd('\0')这个函数的用处? 跨程序集合的访问问题 动态生成的超链接如何添加确认功能? 请学过VB.NET 和C#的朋友帮助 游戏外挂程序的开发 C#实现抽屉式菜单 高手们,分不多了,看一个比较难的问题吧! 怎么限制TextBox的输入的数字是9位数以内 oracle数据库访问! c#处理flash问题 Ext的小问题,--------【标题内容太短!】
public static extern int SetParent(int hWndChild, int hWndNewParent); //temp2是你的子form
temp2.MdiParent = this;
temp2.Show();
SetParent((int)temp2.Handle, (int)this.Handle);
或者是
窗体.ToMost=true;
{
foreach( Form frm in System.Windows.Forms.Application.OpenForms)
{
if (frm is Form2) frm.BringToFront();
}
}