最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

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;
   }
  }
 }
}

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

相關(guān)文章

最新評論

临清市| 抚松县| 探索| 修武县| 金塔县| 扎鲁特旗| 拜城县| 宜春市| 杭锦后旗| 翼城县| 太和县| 百色市| 丹巴县| 汉沽区| 郸城县| 常德市| 江永县| 石首市| 新丰县| 巩义市| 图们市| 东乌珠穆沁旗| 祁阳县| 曲阜市| 铜陵市| 台南县| 新龙县| 鄂尔多斯市| 晋州市| 郴州市| 和静县| 嘉鱼县| 大名县| 枝江市| 青铜峡市| 临邑县| 甘德县| 建德市| 称多县| 余姚市| 七台河市|