473,320 Members | 2,193 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,320 software developers and data experts.

TreeView flashing when resizing form - but only as a Dialog WHY?

I've seen several posts from people who have seen this flashing in
TreeView's when resizing a form. I've noticed it in my app, but only in the
child windows. For example, my main form has a splitter with a TreeView and
I do not get the flickering with it.

I created a new Form based Windows app. Added a TreeView (dock left), then
a splitter and a property grid on the right (dock fill). For this test, I
added a panel and button at the bottom so I could create the child form.

I created a second form and created it the exact same way - TreeView on the
left, splitter and a property grid on the right. In the click handler for
the button on the first form, I create a new "Form2" and call "ShowDialog"
passing "this" in as a parameter to make the main form the parent for the
dialog.

After adding some nodes to each of the tree views, fire up the app. If you
resize the main form, you won't see flickering in the tree view. Click the
button to show the parent form and resize it - you will see horrible
flickering.

Now, why is that? With the exception of the extra panel to hold the button
on the main form, they are identical, yet the child displayed with
ShowDialog shows terrible flickering.

If I had to guess (which I guess I am guessing right now :-) I'd say
Microsoft was expecting that forms shown with "ShowDialog" would not be made
resizable so they left out paint optimizations when resizing. If that is
the case, how do we get rid of the flickering when resizing a dialog?

Thanks,
Terry

Nov 16 '05 #1
1 5189
I have a little more information about this.

I discovered that the tree flickering only happens on XP when the XP themes
are enabled. If the "Windows classic" style is used, the tree view does not
flicker when the dialog is resized.
"Terry" <ch**********@hotmail.com> wrote in message
news:ev**************@TK2MSFTNGP10.phx.gbl...
I've seen several posts from people who have seen this flashing in
TreeView's when resizing a form. I've noticed it in my app, but only in the child windows. For example, my main form has a splitter with a TreeView and I do not get the flickering with it.

I created a new Form based Windows app. Added a TreeView (dock left), then a splitter and a property grid on the right (dock fill). For this test, I
added a panel and button at the bottom so I could create the child form.

I created a second form and created it the exact same way - TreeView on the left, splitter and a property grid on the right. In the click handler for
the button on the first form, I create a new "Form2" and call "ShowDialog"
passing "this" in as a parameter to make the main form the parent for the
dialog.

After adding some nodes to each of the tree views, fire up the app. If you resize the main form, you won't see flickering in the tree view. Click the button to show the parent form and resize it - you will see horrible
flickering.

Now, why is that? With the exception of the extra panel to hold the button on the main form, they are identical, yet the child displayed with
ShowDialog shows terrible flickering.

If I had to guess (which I guess I am guessing right now :-) I'd say
Microsoft was expecting that forms shown with "ShowDialog" would not be made resizable so they left out paint optimizations when resizing. If that is
the case, how do we get rid of the flickering when resizing a dialog?

Thanks,
Terry

Nov 16 '05 #2

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

Similar topics

42
by: lauren quantrell | last post by:
So many postings on not to use the treeview control, but nothing recently. Is it safe to swim there yet with Access 2000-Access 2003?
1
by: Steven | last post by:
Hello, I have a problem in using TreeView. I have made a dialog with TreeView. When I open this dialog , the Drives in the computer could be show in this TreeView.This time, I click the node of...
5
by: Ian Stiles | last post by:
I have tried everything under the sun to get rid of horrible flashing and flickering that occurs on a CSharp form when the form hosts a TreeView or WebBrowser control and then you resize the form....
0
by: Mark Travis | last post by:
Hi all, I have inserted a TreeView control on to a web page. When ever javascript changes the appearance of the page (such as expanding an IFrame), the tree view flashes and flashes alot. ...
1
by: ezelasky | last post by:
I have a huge IE treeview control that is flashing quite significanlty when a node is expanded or collapsed. Is there a way to get rid of this? Smartnavigation does calm it down a bit but then...
8
by: Matt MacDonald | last post by:
Hi All, I have a form that displays hierarchical categories in a treeview. Ok so far so good. What I was to do is have users be able to select a node in the treeview as part of filling out the...
1
by: pigeonrandle | last post by:
Hi, I have a treeview which has some nodes whose text are too long to display, so, when i hover my mouse over the node a tooltip appears showing all the text, and then disappears almost...
9
by: auntiejack56 | last post by:
Hi, I've got a treeview, and I want to display the node text property that I have a) clicked on or b) highlighted using the up or down arrows
11
by: Andrus | last post by:
1. Run code 2. Resize window Observed: Listbox flashes during resize. How to remove this flashing ? Andrus.
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.