Remove ScrollBar from MDI

08-17-2006, 08:02 AM
How can I remove the ScrollBar from an MDI form when moving a child form outside the client area of the MDI form.



08-21-2006, 06:46 AM
Anyone ??

I'm still trying to figure out how to remove those toolbars.

I found and example done in C# that uses the "ShowScrollBar" function in the "WndProc" event of the NativeWindow Class.

Unfortunately, I am not able to make this sample works in

If you want to look at it, here the code sample (


09-08-2006, 03:49 AM
Hey there. I converted the code from the article for you!

Private Const SB_HORZ As Integer = 0
Private Const SB_VERT As Integer = 1
Private Const SB_CTL As Integer = 2
Private Const SB_BOTH As Integer = 3
Private Const WM_NCCALCSIZE As Integer = &H83

<Runtime.InteropServices.DllImport("user32.dll")> _
Private Shared Function ShowScrollBar(ByVal hWnd As IntPtr, ByVal wBar As Integer, ByVal bShow As Integer) As Integer
End Function

Protected Overloads Overrides Sub WndProc(ByRef m As Message)
Select Case m.Msg
ShowScrollBar(m.HWnd, SB_BOTH, 0)
End Select
End Sub

Hope this helps. :)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum