showPopWin弹出的窗口为什么不能拖动 怎样使showPopWin弹出的窗口实现拖动,而且覆盖下面的页面. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 showPopWin是个窗体么?无边框窗体的话可以给某个控件加上mousedown事件实现拖动窗体。 #region 拖动控件移动窗体 [DllImport("user32.dll")] public static extern bool ReleaseCapture(); [DllImport("User32.dll", EntryPoint = "SendMessage", CharSet = CharSet.Auto)] public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); public const int WM_SYSCOMMAND = 0x0112; public const int SC_MOVE = 0xF010; public const int HTCAPTION = 0x0002; private void panelTop_MouseDown(object sender, MouseEventArgs e) { ReleaseCapture(); SendMessage(this.Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0); } #endregion 高手请进,如何解决C#串口丢数据包的问题???? 如何为gridview的列增加属性? 大家来讨论下,顺便散分 tlbimp.exe工具转换dll问题 SQL数据求和问题,急 紧急求救! 客户要求后台监视他自己的电脑的键盘 在sql存储过程怎么写一个多条件的查询: 一个算法问题 C#炮打飞机(多线程)代码怎么写啊,没头绪 C++怎么样调用C#写的DLL 谁能帮我解码下我是用UrlEncode方法转码的
public static extern bool ReleaseCapture();
[DllImport("User32.dll", EntryPoint = "SendMessage", CharSet = CharSet.Auto)]
public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
public const int WM_SYSCOMMAND = 0x0112;
public const int SC_MOVE = 0xF010;
public const int HTCAPTION = 0x0002;
private void panelTop_MouseDown(object sender, MouseEventArgs e)
{
ReleaseCapture();
SendMessage(this.Handle, WM_SYSCOMMAND, SC_MOVE + HTCAPTION, 0);
} #endregion