Bonjour a tous !

Voila donc ma question: y a t-il un moyen d'empêcher une Form fille de sortir du cadre d'un MDI et donc empêcher l'apparition des foutues ScrollBars !!!???
Donc de faire à la manière de notre Windows...imposer une contrainte de mouvement des fenêtres au delà du cadre.

Merci d'avance

PS: j'avais trouver ca mais ca ne fait rien du tout:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
    Private oldLoc As Point
 
    Private Sub _Move(ByVal sender As Object, ByVal e As System.EventArgs) _
      Handles MyBase.Move
        If Not Me.ParentForm Is Nothing Then
            If Me.Left < Me.ParentForm.ClientRectangle.Left Or _
               Me.Right >= Me.ParentForm.ClientRectangle.Width - 5 Or _
               Me.Top < Me.ParentForm.ClientRectangle.Top Or _
               Me.Bottom >= Me.ParentForm.ClientRectangle.Height - 5 Then
                Me.Location = oldLoc
            Else
                oldLoc = Me.Location
            End If
        End If
    End Sub
 
    Private Sub _Load(ByVal sender As Object, _
      ByVal e As System.EventArgs) Handles MyBase.Load
        oldLoc = Me.Location
    End Sub