vb.net窗口去边框 vb无边框窗体
在VB.net中,Tabcontrol控件的边框怎么去掉?
你把 选项卡 拖到屏幕外面不就行了 只显示选项卡内东西 周围边缘都不要了 每个选项卡内配合labl 或按钮 标识不就行了。
专业成都网站建设公司,做排名好的好网站,排在同行前面,为您带来客户和效益!创新互联为您提供成都网站建设,五站合一网站设计制作,服务好的网站设计公司,做网站、网站制作负责任的成都网站制作公司!
VB.net怎么去掉MDI窗体立体边框
DllImport("user32.dll", ExactSpelling:=True) _
Private Shared Function SetWindowPos(ByVal hWnd As IntPtr, ByVal hWndInsertAfter As IntPtr, ByVal X As Integer, ByVal Y As Integer, ByVal cx As Integer, ByVal cy As Integer, _
ByVal uFlags As UInteger) As Integer
End Function
Private Const GWL_STYLE As Integer = -16
Private Const GWL_EXSTYLE As Integer = -20
Private Const WS_BORDER As Integer = H800000
Private Const WS_EX_CLIENTEDGE As Integer = H200
Private Const SWP_NOSIZE As UInteger = H1
Private Const SWP_NOMOVE As UInteger = H2
Private Const SWP_NOZORDER As UInteger = H4
Private Const SWP_NOREDRAW As UInteger = H8
Private Const SWP_NOACTIVATE As UInteger = H10
Private Const SWP_FRAMECHANGED As UInteger = H20
Private Const SWP_SHOWWINDOW As UInteger = H40
Private Const SWP_HIDEWINDOW As UInteger = H80
Private Const SWP_NOCOPYBITS As UInteger = H100
Private Const SWP_NOOWNERZORDER As UInteger = H200
Private Const SWP_NOSENDCHANGING As UInteger = H400
Public Sub ChangeMdiClientBorderStyle(ByVal Value As System.Windows.Forms.BorderStyle, ByVal Handle As IntPtr)
Dim style As Integer = GetWindowLong(Handle, GWL_STYLE)
Dim exStyle As Integer = GetWindowLong(Handle, GWL_EXSTYLE)
' Add or remove style flags as necessary.
Select Case Value
Case BorderStyle.Fixed3D
exStyle = exStyle Or WS_EX_CLIENTEDGE
style = style And Not WS_BORDER
Exit Select
Case BorderStyle.FixedSingle
exStyle = exStyle And Not WS_EX_CLIENTEDGE
style = style Or WS_BORDER
Exit Select
Case BorderStyle.None
style = style And Not WS_BORDER
exStyle = exStyle And Not WS_EX_CLIENTEDGE
Exit Select
End Select
' Set the styles using Win32 calls
SetWindowLong(Handle, GWL_STYLE, style)
SetWindowLong(Handle, GWL_EXSTYLE, exStyle)
' Update the non-client area.
SetWindowPos(Handle, IntPtr.Zero, 0, 0, 0, 0, _
SWP_NOACTIVATE Or SWP_NOMOVE Or SWP_NOSIZE Or SWP_NOZORDER Or SWP_NOOWNERZORDER Or SWP_FRAMECHANGED)
End Sub
''' summary
''' 获取MDIClient句柄
''' /summary
''' returns/returns
''' remarks/remarks
Private Function getMdiClientHandle() As IntPtr
Dim Obj As MdiClient = Nothing
Dim t As Type
For Each Item As Control In Me.Controls
t = Item.[GetType]()
If t.Name = "MdiClient" Then
Obj = DirectCast(Item, MdiClient)
Exit For
End If
Next
If Obj IsNot Nothing Then
Return Obj.Handle
Else
Return IntPtr.Zero
End If
End Function
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Me.IsMdiContainer Then
ChangeMdiClientBorderStyle(BorderStyle.None, getMdiClientHandle)
End If
End Sub
vb.net如何设置窗体内部的大小(除去边框及标题栏部分的大小)
'窗体有个属性ClientSize 是除去边框及标题栏部分的为工作区
'你要的应该就是这个了。
'设置窗体工作区的大小 例为400*300
Me.ClientSize = New Size(400,300)
你好,麻烦你帮助我看看VB窗体的边框怎么去掉?或是把VB窗体的关闭按钮去掉
在属性窗口中把窗体的BorderStyle属性设为0即可(意思就是没有边框)
vb.net 无边框窗体的问题
设置窗体的text为空,设置窗体的controlbox属性为false,设置窗体的FormBorderStyle 属性为Sizable,就可以改变窗体大小了,并且可以在任务栏点击。
当前文章:vb.net窗口去边框 vb无边框窗体
网站链接:http://cdiso.cn/article/hehisg.html