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 / December 2004

Tip: Looking for answers? Try searching our database.

Forms flash

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim Latham - 23 Nov 2004 14:12 GMT
I'm creating forms dynamically and their contained controls
programmatically,
rather than using the Form editor - using Controls.Add(Control).

Some forms created in this way cause the form underneath it to flash
(presumably refresh) when another form is closed.  It happens
regardless of the screen position of the upper form.  With some forms
it does not happen.

Does anyone know what causes this or what would solve it?
Stu Smith - 23 Nov 2004 16:40 GMT
> I'm creating forms dynamically and their contained controls
> programmatically,
[quoted text clipped - 6 lines]
>
> Does anyone know what causes this or what would solve it?

If I remember it's caused by closing a form by setting Visible to false, or
by calling Close(). Forms should (bizarrely in my opinion) be closed by
assigning the DialogResult property.

Stu
paulm@protronics.co.uk - 23 Dec 2004 11:10 GMT
> > I'm creating forms dynamically and their contained controls
> > programmatically,
[quoted text clipped - 12 lines]
>
> Stu
Herfried K. Wagner [MVP] - 23 Nov 2004 19:31 GMT
"Tim Latham" <paulm@protronics.co.uk> schrieb:
> I'm creating forms dynamically and their contained controls
> programmatically,
[quoted text clipped - 4 lines]
> regardless of the screen position of the upper form.  With some forms
> it does not happen.

This is not caused by adding your controly dynamically because that's what
the forms designer is doing too...  I feel sorry, but I don't know the
reason for the flashing ;-).

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/

Serg - 23 Nov 2004 22:21 GMT
Make sure that there is nothing in the logic of your code that causes the
flashing forms to be loaded more than once. That would give appearence of
flashing. Another thing that might work would be suspending layout similar to
how the framework does when it generates code.

> I'm creating forms dynamically and their contained controls
> programmatically,
[quoted text clipped - 6 lines]
>
> Does anyone know what causes this or what would solve it?

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.