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.

Form Activation

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Liping - 11 Aug 2004 23:37 GMT
Hi,

I am currently involved in .Net windows form application, but in an uncommon
way.

The application has a main windows form which displays a title panel on top
and several navigation buttons at bottom. Whenever a button is clicked,
another assembly will be loaded on the fly, and a corresponding form will be
dynamically constructed from the loaded assembly and displayed in the middle
area on the screen on top of the main windows form.

The reason why we implemented this way is to separate each form related to
each button, so it is easier to debug.

The problem is, since the main windows form and the form dynamically created
are from different application domains, whenever the main windows form is
activated, the button form will be hidden behind. For example, if mouse is
clicked in the main windows form area between the buttons.

I wonder if anybody has been in this kind of project and how the problem is
solved.
Thanks,

Liping
Chris - 14 Aug 2004 19:11 GMT
Hi Liping,

You could try looking at the "TopMost" property.

Set the Topmost to true for all your dynamic forms. This would keep your
dynamic forms visible above the main form even when the main form is selected
with the mouse. The main form would still be usable so the buttons would
still be able to launched other dynamic forms.
If you want to limit the user to only one dymanic form at a time you could
try setting the "Enabled" property of the main form to false instead,
remembering to provide a re-enable of it somewhere in the dynamic forms
shutdown code.

Be Lucky
Liping - 02 Sep 2004 23:45 GMT
Hi Chris,

Thanks. But that will prevent other windows applications to work properly,
since
the dynamic form is topmost.

Think I need a way to know when other application's form is activated and
make the dynamic form non-topmost. And make it topmost again when my main
window is activated.

Liping

> Hi Liping,
>
[quoted text clipped - 10 lines]
>
> Be Lucky

Rate this thread:







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.