C#完成讓窗體永久在窗體最後面顯示的實例。本站提示廣大學習愛好者:(C#完成讓窗體永久在窗體最後面顯示的實例)文章只能為提供參考,不一定能成為您想要的結果。以下是C#完成讓窗體永久在窗體最後面顯示的實例正文
本文以實例描寫了C#完成讓窗體永久在窗體最後面顯示的辦法,詳細步調以下:
1、新建一個窗體法式,添加一個Timer和設置它可用並綁定事宜。
2、設置窗體的TopMost屬性為True
3、然後設置代碼以下便可完成.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;namespace jiyi
{
public partial class Form1 : Form
{public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void timer1_Tick(object sender, EventArgs e)
{
this.TopMost = false;
this.BringToFront();
this.TopMost = true;
}
}
}