VB中什么是MDI窗体如果一个软件中有多个窗体,其中有一个为母窗体 , 即MDI窗体
在VB中可以添加MDI窗体,窗体颜色为深灰色 。然后在其他子窗体中,设置MDIChild属性为True,这样,母窗体和子窗体的关系就建立起来了 。
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 mdi窗体 皮肤控件 报错vb.netmdi窗体我刚用过,
在父窗体的构造函数中写
skinEngine1.SkinFile
=
"Longhorn.ssk";
"longhorn.ssk"是你要用的皮肤名称,记住把皮肤放到\bin\Debug目录下
只要在父窗体使用皮具即可,其vb.netmdi窗体他窗体自动实现窗体更换
采纳后可以追问
VB里的MDI窗体和普通窗体有什么区别MDI窗体分成母窗体和子窗体
其中可以有多个窗体做为子窗体显示在母窗体里面,有一个从属vb.netmdi窗体的关系,
而普通窗体是一个平等vb.netmdi窗体的关系,显示效果互不影响
如何给VB.NET窗体添加子窗体?直接添加一个MID父窗体或在已有窗体vb.netmdi窗体的属性中找到IsMDIContainer属性vb.netmdi窗体,然后设置为Truevb.netmdi窗体,然后创建第二个窗体 vb.netmdi窗体,需要加载子窗体的时候:
推荐阅读
- 新媒体如何提高策划能力,新媒体如何提高策划能力论文
- sap后资本化,Sap后资本化资产能跨年对吗
- 鲁大师硬盘怎么安装系统,鲁大师怎么装机
- 无人电台怎么直播,无人电台怎么直播的
- c语言函数htoi C语言函数的三要素
- cpu为什么显示关闭,cpu显示怎么关闭
- asp.net下载文件名乱码,asp下载文件代码
- 抖音直播道具图在哪找到,抖音直播的道具在哪
- vb.net删除数组 vb如何删除数组中的某一个元素