I'm working on a .NET 2.0 WinForms app that uses MDI.
It works perfectly when I'm testing it under Windows 7, but when I install the exact same application in Windows XP the child windows are no longer MDI windows. I can drag them out of their parent window.
Does anybody have an explanation for this odd behavior?
Update: It works on Windows 7 and Vista. It works on XP when it is built on XP, but building the project and deploy it to XP then it doesn't work. This is getting stranger by the minute.
Code (I cut out the parts not dealing with the forms)
Imports Model = TakeHomeModel
Imports System.Windows.Forms
Public Class MainForm
Private WithEvents gebruikers As frmGebruikers
Private WithEvents fotos As frmFotos
Private WithEvents tweets As frmTweets
Private rapport As frmReport
Private zoeker As New frmZoek
Private Sub GebruikersToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GebruikersToolStripMenuItem.Click
If gebruikers.Visible = False Then
gebruikers.Show()
Else
gebruikers.Hide()
End If
End Sub
Private Sub MainForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Icon = My.Resources.appico
Model.InitDatabase(My.Application.Info.DirectoryPath & "\takehome.accdb")
gebruikers = New frmGebruikers
fotos = New frmFotos
tweets = New frmTweets
rapport = New frmReport
rapport.MdiParent = Me
gebruikers.MdiParent = Me
fotos.MdiParent = Me
tweets.MdiParent = Me
zoeker.MdiParent = Me
End Sub
Private Sub FotosToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FotosToolStripMenuItem.Click
If fotos.Visible = False Then
fotos.Show()
Else
fotos.Hide()
End If
End Sub
Private Sub TweetsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TweetsToolStripMenuItem.Click
If tweets.Visible = False Then
tweets.Show()
Else
tweets.Hide()
End If
End Sub
End Class