bool first = true; private void splitContainer1_SplitterMoving(object sender, SplitterCancelEventArgs e) { if (first == true) { MainViewport.SplitterMoving = true; first = false; } } private void splitContainer1_SplitterMoved(object sender, SplitterEventArgs e) { first = true; MainViewport.SplitterMoving = false; }
Dim first As Boolean = True Private Sub SplitContainer1_SplitterMoving(ByVal sender As System.Object, ByVal e As System.Windows.Forms.SplitterCancelEventArgs) Handles SplitContainer1.SplitterMoving If first = True Then MainViewport.SplitterMoving = True first = False End If End Sub Private Sub SplitContainer1_SplitterMoved(ByVal sender As System.Object, ByVal e As System.Windows.Forms.SplitterEventArgs) Handles SplitContainer1.SplitterMoved first = True MainViewport.SplitterMoving = False End Sub