"Brian Henry" <no****@nospam.com> wrote in message
news:u8**************@TK2MSFTNGP10.phx.gbl...
Is there any easy way to remove the 3D boarder around the MDI client area?
Modify the Designer Generated code to add a reference to the MDIClient
control:
\\\
Private WithEvents MDI As MDIClient
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Me.MDI = New MDIClient
...
Me.Controls.Add(Me.MDI)
...
End Sub
///
Then add a call to setwindowlong in the forms Layout method. (if you put it
in the Load method then where the 3d border was will not be redrawn when the
form is shown).
\\\
Private Sub Form_Layout(ByVal sender As Object, ByVal e As LayoutEventArgs)
Handles MyBase.Layout
SetWindowLong(MDI.Handle, GWL_EXSTYLE, IntPtr.Zero)
End Sub
///
These are the necessary declarations:
\\\
<System.Runtime.InteropServices.DllImport("user32" )> _
Private Shared Function SetWindowLong(ByVal hWnd As IntPtr, ByVal nIndex As
Int32, _
ByVal dwNewLong As IntPtr) As IntPtr
End Function
Private Const GWL_EXSTYLE As Int32 = (-20)
///
--
Mick Doherty
http://dotnetrix.co.uk/nothing.html