Problem with MdiChil form Maximized

  • Thread starter Thread starter Nuno Monteiro
  • Start date Start date
N

Nuno Monteiro

Hi!
I've got a problem when I get the MDI maximized, so when I open more than
one
ChildForm maximized, the program shows two control boxes, and when I try to
close them,
one of them still open and I cannot close it. As it shows the attach.
Anyone knows why this happen?

--
Cumprimentos,
Nuno Monteiro
(e-mail address removed)
RCSoft - Desenvolvimento de Software, Lda.
Telef: 239708708
Fax: 239708701
 
Hello,

It would help to be able to look at your code, but you
might want to consider getting rid of control boxes for
the mdichild forms. you have a parent that needs a
control box, the mdichild forms should work fine without
the control box. If this is completely different
situation I appologize for that.

R/ Justin

Software Developer
C4 Planning Solutions
Augusta, GA
 
Thanks!
The problem do not happen all the time, just sometimes
And I need the Control boxes.
Here is my code to open a mdiChild form:


Dim call_form As New «formName»
MostraChild(call_form, Me)


Public Function MostraChild(ByVal frmChildForm As Form, ByVal frmPai As
Form)
Dim bFlag As Boolean = False
Dim frmCheck As Form

' check if form is open
For Each frmCheck In frmPai.MdiChildren
' Se já estiver aberto então activa-o
If frmCheck.Name = frmChildForm.Name Then
frmCheck.Activate()
frmCheck.Show()
If frmCheck.WindowState = FormWindowState.Minimized Then
frmCheck.WindowState = FormWindowState.Normal
End If
bFlag = True
Exit For
End If
Next

' if not open then Open it
If bFlag = False Then
frmChildForm.MdiParent = frmPai
frmChildForm.Show()
frmChildForm.Focus()
End If
End Function
 
Back
Top