Can't control the behavior of MDI forms

08-16-2006, 03:12 AM
I am trying to develop an MDI application but face a couple problems controlling the appearance of the application.

I've circled 2 problems in the picture:

1) When I open the MDI child, the page scroll down to the bottom but I want it to scroll to the top.
2) I can't hide the control bar by setting the ControlBox property to False. This can be done in VB6.

Below please find the code of my application.


Protected Const ptvDataBB = 0
Protected Const ptvReport = 1
Protected Const ptvExit = 2

Private Sub openForm(ByRef frm As Form)
With frm
.MdiParent = Me
.WindowState = FormWindowState.Minimized
.WindowState = FormWindowState.Maximized
End With
End Sub

Private Sub tbMain_ButtonClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolBarButtonClickEventArgs) Handles tbMain.ButtonClick
Select Case e.Button.ImageIndex
Case ptvDataBB
Dim frmDB As New frmDataBB

If TypeOf (ActiveMdiChild) Is frmDataBB Then
End If
Case ptvReport
Dim frmRpt As New frmReportViewer

Case ptvExit
If Me.ActiveMdiChild Is Nothing Then
End If
End Select
End Sub

08-17-2006, 01:01 AM
Does anyone have any idea to resolve my problems? Did I describe the problems clearly?

Thanks in advance!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum