Remove ScrollBar from MDI

rufen101
08-17-2006, 07: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.

Thanks

Rufen

rufen101
08-21-2006, 05: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 Vb.net

If you want to look at it, here the code sample (https://secure.codeproject.com/cs/miscctrl/mdiclientcontroller.asp)

Thanks

CForrester
09-08-2006, 02: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
Case WM_NCCALCSIZE
ShowScrollBar(m.HWnd, SB_BOTH, 0)
End Select
MyBase.WndProc(m)
End Sub


Hope this helps. :)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum