2
A
回答
2
設置FormBorderStyle = None,然後使用鼠標懸停和鼠標事件以定製處理您的移動或查看SplitContainer。
0
好了,在這裏你去,下面的代碼將確保表單只能垂直移動:
public partial class FrmMain : Form {
Point mouse_offset;
private void FrmMain_MouseDown(object sender, MouseEventArgs e) {
mouse_offset = new Point(-e.X, -e.Y);
}
private void FrmMain_MouseMove(object sender, MouseEventArgs e) {
if (e.Button == MouseButtons.Left) {
Point mousePos = Control.MousePosition;
mousePos.Offset(0, mouse_offset.Y);
mousePos.X = this.Location.X;
this.Location = mousePos;
}
}
}
相關問題
- 1. Captionless wxPython的窗口隱藏任務欄
- 2. Winforms - 禁用當用戶通過邊框拖動窗體來移動窗體時,它調整窗體大小
- 3. 的WinForms:子窗體關閉父窗體
- 4. WinForms MDI子窗體
- 5. 的WinForms - 從子窗體
- 6. WPF窗體+ MDI中的Winforms
- 7. C#winforms啓動(Splash)窗體不隱藏
- 8. 窗體關閉但可見
- 9. 窗體的拖動將窗體向下移動
- 10. 引導窗體,而移動
- 11. C#窗體控件移動
- 12. C#winforms窗體顯示cmd
- 13. Winforms透明窗體問題
- 14. 可以從另一個窗體派生的窗體類中移動控件嗎?
- 15. 如果可以,我可以移動modalpopextender編輯窗體嗎?
- 16. 動態移除/添加Windows窗體窗體上的控件
- 17. 爲窗體移動設置窗體的背景圖像
- 18. 從C中的圖片框移動窗體窗體#
- 19. 的WinForms - 錯誤的窗體大小
- 20. winforms,web窗體和windows窗體之間的區別
- 21. WinForms中的父窗體和子窗體用戶控件通信
- 22. 我可以「移動」屏幕,但屏幕上的物體仍在移動嗎?
- 23. 移動視圖上的水平窗體
- 24. 的Android移動窗體Form1到FORM2
- 25. 移動Win窗體中的對象
- 26. 沒有窗體的Windows移動程序
- 27. C#Windows窗體。 PictureBox上的可移動區域
- 28. C#想要限制窗體可以移動到的位置
- 29. 如何在Visual Basic中創建可移動的透明窗體?
- 30. 創造的WinForms可移動和可調整大小的線
是您瞭解如何當你隱藏標題欄移動窗體的問題?如果是這樣,那麼「片面可動」是什麼意思? – 2010-11-29 04:56:39