欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

C#實(shí)現(xiàn)將窗體固定在顯示器的左上角且不能移動(dòng)的方法

 更新時(shí)間:2015年08月25日 12:22:33   作者:我心依舊  
這篇文章主要介紹了C#實(shí)現(xiàn)將窗體固定在顯示器的左上角且不能移動(dòng)的方法,涉及C#窗體固定操作的相關(guān)技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下

本文實(shí)例講述了C#實(shí)現(xiàn)將窗體固定在顯示器的左上角且不能移動(dòng)的方法。分享給大家供大家參考。具體實(shí)現(xiàn)方法如下:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Runtime.InteropServices;
namespace App
{
 public partial class Form4 : Form
 {
  public Form4()
  {
   InitializeComponent();
   this.StartPosition = FormStartPosition.Manual;
   this.Location = new Point(0, 0);
  }
  protected override void WndProc(ref Message m)
  {
   base.WndProc(ref m);
   if (m.Msg == 0x84 && m.Result == (IntPtr)2) //不讓拖動(dòng)標(biāo)題欄 
   {
    m.Result = (IntPtr)1;
   }
   if (m.Msg == 0xA3) //雙擊標(biāo)題欄無反應(yīng) 
   {
    m.WParam = System.IntPtr.Zero;
   }
  }
 }
}

希望本文所述對(duì)大家的C#程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評(píng)論