473,396 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

dynamic windows form

vb.net, visual studio 2005, windows forms

My application dynamically creates controls and adds them to a panel on a
form. This is done in the form load event.

I don't know if I would call it flickering, but parts of some controls get
displayed before others. They don't exactly flicker, they just appear in
pieces, instead of all at once. The controls include nested panels. I have
tried to avoid TableLayoutPanels because the performance is so terrible.

Before I add the controls, I suspend layout for the form and the panel. The
form is double-buffered.

I also tried setting the panel.visible = false and then true when the
contols were all created and added to the panel, but it doesn't help.

It looks funky while the page is loading, although it loads fast so its not
too bad.

I would like to fix this, and I would appreciate any suggestions.

Thanks
Bill
Feb 7 '08 #1
1 1668
My application dynamically creates controls and adds them to a panel on a
form. This is done in the form load event.

I don't know if I would call it flickering, but parts of some controls get
displayed before others. They don't exactly flicker, they just appear in
pieces, instead of all at once. The controls include nested panels. I have
tried to avoid TableLayoutPanels because the performance is so terrible.

Before I add the controls, I suspend layout for the form and the panel. The
form is double-buffered.

I also tried setting the panel.visible = false and then true when the
contols were all created and added to the panel, but it doesn't help.

It looks funky while the page is loading, although it loads fast so its not
too bad.

I would like to fix this, and I would appreciate any suggestions.
In a similar setting, I have a form with an empty TabControl. In the form's
load event, I add several panels, and on each panel I add about 20 controls.
I get a good draw by setting the form.visible to false at the beginning of
the form load event, and true at the bottom.

IMO, the flicker you are experiencing comes from more than one drawing
operation being performed in rapid succession. There is at least one draw
because of what you are doing in the load event, and later there is another
draw caused by .net/windows. The way to stop this is to run the load event
with the form's visible set to false.

Feb 7 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Bil Muh | last post by:
Esteemede Developers, I would like to Thank All of You in advance for your sincere guidances. I am developing a software using Visual C++ .NET Standard Edition with Windows Form (.NET)...
0
by: Deutsche Dogge | last post by:
Hi. I'M having a weird problem with addign menuitems to a menu dynamically on the popup event of the menuitem containing the container of the menuitems i wanna add (tools -> external -> {list of...
5
by: hzgt9b | last post by:
Is it possible to dynamically add controls (speciifcally System.Windows.Forms.ProgressBar and System.Windows.Forms.Label) to a panel to a form and have them display (and fucntion) at run time? ...
1
by: Nathan Bloomfield | last post by:
Does anyone know if there is any documentation which relates to Access2k + ? or can anyone help adjust the code? I am having trouble converting the DAO references. TITLE :INF: How to...
1
by: Will | last post by:
Hi all. I'm learning VB.Net and am developing a WinForms app. I'm trying to make an app that I will use to scan in one or more than on image. I want to use a tabbed interface to hold each image....
6
by: MikeY | last post by:
Hi Everyone, Does anyone know where I can get my hands on a sample with source code of a simple dynamic button control in C# Windows form. I am looking for a sample that uses a class library...
3
by: Tom | last post by:
Can I dynamic call vb.net object such like vb6 as sample dim A as object set a = createobject("myobject.test") a.open() now mypbject.test is create vb.net . How can I dynamic call without...
3
by: RahimAsif | last post by:
I am writing an application that requires the a portion of the main menu to be dynamic. The menu has file, panels, view files and help across the top. The view files sub menu needs to be...
3
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
0
by: JamesOo | last post by:
I have the code below, but I need to make it searchable in query table, below code only allowed seach the table which in show mdb only. (i.e. have 3 table, but only can search either one only,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.