代码:

 using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms; namespace FreeNotes
{
public partial class kk : Form
{
public kk()
{
InitializeComponent();
} [DllImport("user32.dll")]
public static extern bool ReleaseCapture(); [DllImport("user32.dll")]
public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); private void kk_MouseDown(object sender, MouseEventArgs e)
{
ReleaseCapture();
SendMessage(this.Handle, 0x0112, 0xF012, );
}
}
}

C# 点击窗口任意位置拖动的更多相关文章

  1. Android点击其他任意位置收起软键盘

    在Android应用开发中,经常出现这样的需求,用户在输入文字的过程中,可能不想继续输入了,通过滑动或者点击其他位置(除软键盘和EditText以外的任何位置),希望能够自动收回键盘,这个功能可能有些 ...

  2. JS 实现点击页面任意位置隐藏div、span

    通过调用下面的 showhidden(“标签ID”) 显示div/span/…等标签内容,可以实现点击页面任意地方再次隐藏该标签内容,而showhidden(“标签ID”,”nohidden”)可保存 ...

  3. winform 窗口点击窗体任意位置移动窗体

    private bool _isDown; private Point _mousePoint; private void Users_MouseDown(object sender, MouseEv ...

  4. Swift 3 点击屏幕任意位置隐藏键盘

    func hideKeyboardWhenTappedAround() { let tap: UITapGestureRecognizer = UITapGestureRecognizer(targe ...

  5. 给gridview增加行链接,点击行任意位置进行跳转

    原文发布时间为:2009-04-14 -- 来源于本人的百度文章 [由搬家工具导入] 可这样,在GridView的RowDataBound输入代码,假如id在第0列,且不是摸板列: C# code p ...

  6. Duilib改进窗口拖动,使整个窗口都能拖动两种方法(转载)

    转载:http://www.cnblogs.com/XiHua/articles/3490490.html 转载:http://blog.csdn.net/lostspeed/article/deta ...

  7. 点击任意位置关闭(CocosCreator)

    推荐阅读:  我的CSDN  我的博客园  QQ群:704621321  我的个人博客       今天,接触到一个新功能,当弹出某个弹框时,需要点击除弹框的剩余任意位置,来关闭该弹框,例如:当红框内 ...

  8. [转载]GridView中点击某行的任意位置就选中该行

    原文链接:http://www.cnblogs.com/Echo529/p/4521701.html GridView中点击某行的任意位置就选中该行 分类: 第一步:添加选择列 点击GridView右 ...

  9. GridView中点击某行的任意位置就选中该行

    GridView中点击某行的任意位置就选中该行 -- :: 分类: 第一步:添加选择列 点击GridView右边小尖头,双击CommandField,选中"选择",添加,将起设置为不可见: 第二步:处 ...

随机推荐

  1. BZOJ 1062

    program candy bzoj1062; ; maxm=; maxn=; var n,len,m,i,p,t,l,r,c,d,q:longint; s:..,..maxn,..maxm] of ...

  2. UBER司机奖励政策

    高峰时段: 早高峰:早6:30-8:30点 晚高峰:晚4:00-7:00点 *周六日只有晚高峰 其他时间均为平峰时段 滴滴快车单单2.5倍,注册地址:http://www.udache.com/如何注 ...

  3. python Unicode转ascii码的一种方法

    缘起 看到这样的数据:Marek Čech.Beniardá怎样变成相对应的ascii码呢 解决 import unicodedata s = u"Marek Čech" #(u表 ...

  4. Ants(思维)

    Ants Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 12893   Accepted: 5637 Description ...

  5. 【Linux操作系统分析】设备驱动处理流程

    1 驱动程序,操作系统,文件系统和应用程序之间的关系 字符设备和块设备映射到操作系统中的文件系统,由文件系统向上提供给应用程序统一的接口用以访问设备. Linux把设备视为文件,称为设备文件,通过对设 ...

  6. JavaSE学习总结第17天_集合框架3

      17.01 ArrayList集合的toString()方法源码解析 代码: Collection c = new ArrayList(); c.add("hello"); c ...

  7. [转载]CSS 创作指南(Beta)(css规范)

    当年还在纠结各种规范的时候,不知道从哪里翻到这个,就让我脱离了css这个规范的苦海了... 反正就是团队和项目合作说的算,选择合适的进行使用就可以了,见到合适的文章,我也会转载过来的 来源 https ...

  8. beta分布

    http://blog.csdn.net/sweetrryy/article/details/6436358

  9. poj 3252

    http://poj.org/problem?id=3252//自己搞了很长时间...现在刚刚有点明白.. 1 #include <iostream> using namespace st ...

  10. C语言选择法排序

    #include <stdio.h> int main() { int i, j, p, n, q; ] = {, , , , }; //对无序数组进行排序 ; i<; i++) { ...