积极答复者
vb.net如何让一个FormBorderStyle为None的无边框窗体可改变大小?

问题
答案
-
你好,請參考一下這連結中的文章
大家一齊探討、學習和研究,謝謝!
MCSD, MCAD, MCSE+I, MCDBA, MCDST, MCSA, MCTS, MCITP, MCPD,
MCT, Microsoft Community Star(TW & HK),
Microsoft MVP for VB.NET since 2003
My MSMVP Blog
請記得將對您有幫助的回覆標示為解答以幫助其他尋找解答及參與社群討論的朋友們。
Please remember to clickMark as Answer on the post that helps you. This can be beneficial to other community members reading the thread.- 已建议为答案 Youjun TangModerator 2014年11月24日 2:44
- 已标记为答案 Youjun TangModerator 2014年12月5日 7:32
-
你好,
这个需要重写WndProc()方法。
Private Const cGrip As Integer = 16 ' Grip size Private Const cCaption As Integer = 32 ' Caption bar height; Protected Overrides Sub WndProc(ByRef m As Message) If m.Msg = &H84 Then ' Trap WM_NCHITTEST Dim pos As New Point(m.LParam.ToInt32() And &HFFFF, m.LParam.ToInt32() >> 16) pos = Me.PointToClient(pos) If pos.Y < cCaption Then m.Result = IntPtr.op_Explicit(2) ' HTCAPTION Return End If If pos.X >= Me.ClientSize.Width - cGrip AndAlso pos.Y >= Me.ClientSize.Height - cGrip Then m.Result = IntPtr.op_Explicit(17) ' HTBOTTOMRIGHT Return End If End If MyBase.WndProc(m) End Sub
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已编辑 Youjun TangModerator 2014年11月28日 9:07 改成vb的代码
- 已标记为答案 Youjun TangModerator 2014年12月5日 7:32
全部回复
-
你好,請參考一下這連結中的文章
大家一齊探討、學習和研究,謝謝!
MCSD, MCAD, MCSE+I, MCDBA, MCDST, MCSA, MCTS, MCITP, MCPD,
MCT, Microsoft Community Star(TW & HK),
Microsoft MVP for VB.NET since 2003
My MSMVP Blog
請記得將對您有幫助的回覆標示為解答以幫助其他尋找解答及參與社群討論的朋友們。
Please remember to clickMark as Answer on the post that helps you. This can be beneficial to other community members reading the thread.- 已建议为答案 Youjun TangModerator 2014年11月24日 2:44
- 已标记为答案 Youjun TangModerator 2014年12月5日 7:32
-
你好,
这个需要重写WndProc()方法。
Private Const cGrip As Integer = 16 ' Grip size Private Const cCaption As Integer = 32 ' Caption bar height; Protected Overrides Sub WndProc(ByRef m As Message) If m.Msg = &H84 Then ' Trap WM_NCHITTEST Dim pos As New Point(m.LParam.ToInt32() And &HFFFF, m.LParam.ToInt32() >> 16) pos = Me.PointToClient(pos) If pos.Y < cCaption Then m.Result = IntPtr.op_Explicit(2) ' HTCAPTION Return End If If pos.X >= Me.ClientSize.Width - cGrip AndAlso pos.Y >= Me.ClientSize.Height - cGrip Then m.Result = IntPtr.op_Explicit(17) ' HTBOTTOMRIGHT Return End If End If MyBase.WndProc(m) End Sub
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.- 已编辑 Youjun TangModerator 2014年11月28日 9:07 改成vb的代码
- 已标记为答案 Youjun TangModerator 2014年12月5日 7:32