Slow rendering when adding usercontrol to panel
-
I have a usercontrol with many controls (labels, textboxes, etc...). When I try to add this usercontrol to a panel, the rendering of the usercontrol is slow. You can see controls rendering when the control is added to the panel. I have tried to the SuspendLayout/ResumeLayout of the usercontrol, panel as well as the form itself, but you can still see the rendering. How do I stop this from happening? Thanks in advance.
-
I have a usercontrol with many controls (labels, textboxes, etc...). When I try to add this usercontrol to a panel, the rendering of the usercontrol is slow. You can see controls rendering when the control is added to the panel. I have tried to the SuspendLayout/ResumeLayout of the usercontrol, panel as well as the form itself, but you can still see the rendering. How do I stop this from happening? Thanks in advance.
-
I have a usercontrol with many controls (labels, textboxes, etc...). When I try to add this usercontrol to a panel, the rendering of the usercontrol is slow. You can see controls rendering when the control is added to the panel. I have tried to the SuspendLayout/ResumeLayout of the usercontrol, panel as well as the form itself, but you can still see the rendering. How do I stop this from happening? Thanks in advance.
idea of possible hack. make it Visible = false add it then Visible = true dunno if it will work, but it might be worth a shot... Also, if you UserControl and its child are translucent / transparent that might be suboptimal, the WinForm implementatino is quite labor intensive. I think there is a flag somewhere which turn translucency off. But I forgot, haven't done WinForm in a while...
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.
-
idea of possible hack. make it Visible = false add it then Visible = true dunno if it will work, but it might be worth a shot... Also, if you UserControl and its child are translucent / transparent that might be suboptimal, the WinForm implementatino is quite labor intensive. I think there is a flag somewhere which turn translucency off. But I forgot, haven't done WinForm in a while...
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.
-
I've had the same problem too and am really stumped. I have 256 textboxes on a GUI. man! is that really slow to populate the textboxes. (I'm working on the table - somewhat like multiplication table).
Blubbo wrote:
I have 256 textboxes on a GUI
:omg: I hope I never have to use your application! There is no justifiable reson to require that much data, or to present that much data to/from a user in one view IMO.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
Why are you using VB6? Do you hate yourself? (Christian Graus) -
Blubbo wrote:
I have 256 textboxes on a GUI
:omg: I hope I never have to use your application! There is no justifiable reson to require that much data, or to present that much data to/from a user in one view IMO.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
Why are you using VB6? Do you hate yourself? (Christian Graus) -
I would create a control and draw the data in the OnPaint. If the data needs to be editable, handle the mouse events and display a textbox at the mouse coordinates on right click or whatever, invalidate and get rid of textbox when edit is completed. This will be very quick (many times quicker than creating loads of text boxes) and you have total control over the way everything is drawn. It is possible to databind as well if you wish.
Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
Why are you using VB6? Do you hate yourself? (Christian Graus)