using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace 窗口最前端
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Form2 frm = new Form2();
frm.Show();
}
}
}
将form1的 topmost设置为 true
project以及效果
http://yunpan.cn/csJANhJ3BVueY 提取码 3917
版权声明:本文博客原创文章,博客,未经同意,不得转载。