求一段无边框窗口改变打下的代码?

xnlm2005 2012-05-22 10:12:02
窗体的BorderStyle设为None时,如何改变大小?求完整代码?
...全文
137 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
caoqinghua 2012-05-23
  • 打赏
  • 举报
回复

[System.Runtime.InteropServices.DllImport("user32.dll")]
private static int ReleaseCapture()
{
}
[System.Runtime.InteropServices.DllImport("user32.dll", EntryPoint = "SendMessageA")]
private static int SendMessage(int hwnd, int wMsg, int wParam, int lParam)
{
}
//响应Panel1鼠标MouseDown事件
private void Panel1_MouseDown(System.Object sender, System.Windows.Forms.MouseEventArgs e)
{
ReleaseCapture();
SendMessage(base.Handle, 0x112, 0xf008, 0);
}

bdmh 2012-05-23
  • 打赏
  • 举报
回复
xnlm2005 2012-05-23
  • 打赏
  • 举报
回复
呵呵,我要求没说清楚啊,要求用鼠标拖动
纵横宇宙 2012-05-23
  • 打赏
  • 举报
回复
this.Size = new Size(宽度,高度);

111,098

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧