Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / September 2004

Tip: Looking for answers? Try searching our database.

HELP - MDI Form with SDI - SDI hidden by MDI objects

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pedro - 14 Sep 2004 20:23 GMT
Hi all;

I have one MDI form, with it's IsMDIForm property set to true, which
has lot's of components (panels, toolbars, menus, explorer bars,
etc.). I also have one SDI form, and somewhere in my code i do this;

'MDI FORM - toMainForm
'SDI FORM - loPreview

...
Dim loPreview as new Form
loPreview.MdiParent = toMainForm
loPreview.Show()
...

This aparently works fine, but my SDI form shows behind of my Mdi form
components. I checked my SDI form and it's visible property is set to
true and the object is acessible when created and invoked. I've tryed
with a simple app.
and sdi form is loaded and activated correctly, but remains on the
back of my Mdi objects!... Tryed also bringing Sdi form to the front
of z-order, selecting it, giving it the focus, refreshing it, but
nothing works!...

Why? Is it a .NET bug? No other solution is available form me, 'cause
i need my loPreview to interact with toMainForm objects and if i add
loPreview to toMainForm a strange behavior occurs when interacting
with each other.

I think MDI's logic is to ensure this kind of needs (mdichild forms
can interact with mdiparent form). How can i workaround this issue?

I'm strugling with this for quite some time, and any help would be
greatly appreciated!

Please, help is urgent!

Thanks in advance!
Pedro - 20 Sep 2004 09:34 GMT
Hi all;

My feelings tell me that i've reached a dead end. No one seems to had
this issues or reported this kind of problems with MDIs and no one has
a clue.
I guess my only solution is to work with SDIs and loose MDI's
interactivity.

Although, i thougth someone would reply since my first post! It's sad
when no one reply to your posts, no matter if they have or not the
rigth answer!

Thanks anyway!

> Hi all;
>
[quoted text clipped - 34 lines]
>
> Thanks in advance!
Antonio - 21 Sep 2004 03:36 GMT
Hello Pedro,

Did you try to define the MainForm as well?

Dim theMainForm as New toMainForm
Dim loPreview as new Form
loPreview.MdiParent = theMainForm
loPreview.Show()

> Hi all;
>
[quoted text clipped - 45 lines]
>>
>> Thanks in advance!
Pedro - 21 Sep 2004 09:22 GMT
Hi Antonio and thanks for replying;

I'm not sure if i made myself clear on this:

My MDI toMainForm already exists and it's already defined. What do you
mean by define toMainForm as well? Do you mean, create another
instance of toMainForm? For what purpose? And that will work for me?
Can you be more specific?

Thanks for your time and thanks in advance!

> Hello Pedro,
>
[quoted text clipped - 54 lines]
> >>
> >> Thanks in advance!
Pedro - 22 Sep 2004 19:26 GMT
Hi all;

Finally got it!!

Honestly, i gave up from MDI's - the reported issues in previows posts
remains, and apparently without solution (hope it's not a VS.NET 2003
1.1 bug but if so, i hope MS's VS.NET 2005 has given the rigth
solution to this).

I didn't mentioned it, but in the first place, i've tryed to work with
SDI's and because of a strange behavior - thougth it would be caused
precisely by SDI's - i changed my approach and implementation.

The strange behavior, related to event objects that never occured, was
quite a pain in the ... to workaround (really annoying but caused by
some bad code of my own, so i cannot complain, right?), but in the
end, it was worth it!

Now i simply do as follow;

Dim loPreview As frmLstPreview = New frmLstPreview
If Not toMainForm Is Nothing Then
  toMainForm.AddOwnedForm(loPreview)
End If
loPreview.Show()

and just like that, i can iteract with my toMainForm objects and with
loPreview and so long "strange behavior"!

I wonder why MDI's, intended to implement interaction, can't do this?
Maybe it's something that i'm missing, but it doesn't matter anymore!

Thanks for your time and patient!

> Hi Antonio and thanks for replying;
>
[quoted text clipped - 65 lines]
> > >>
> > >> Thanks in advance!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.