473,486 Members | 2,114 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Something more performant than Hide and Show control method?

I have a full custom application with some widged extending Controls
like Label and PictureBox. I build a menu with these widgets. When
I click on one of them, it calls a function to display some stuff in
the main display area.

The stuff to display is one of many assemblies loaded at the opening
of the application by Activator.CreateInstance, because I want it
independant of the main application, as a plugin. All assembly are
loaded in the same Panel Control (with transparent background). Each
of these assembly have a Hide and Show method, and inside these method
I call the original Hide and Show method for each custom widget (Label
Controls) contained in the assembly. At the opening all is set to
hide in the Panel.

I doublebuffered the constructor of each widget that extending control
(the Panel, the Label and PictureBox) with :
// Set this style properties
SetStyle(ControlStyles.UserPaint, true);
SetStyle(ControlStyles.AllPaintingInWmPaint, true);
SetStyle(ControlStyles.DoubleBuffer, true);

So the problem is when I click on one of my widget in my menu, it's
suppose to call Invoke the Show function of my assemblies to display
the selected one. By clicking another widget, it Hide the current
one and show the new selected one. But it's slow!!!! I have to
wait maybe 100 ms before display the new image and text. Since we
know all my assembly are loaded, and the only function call is Hide
and Show on my controls, can we conclude that Hide and Show are non
performant?

By adding the DoubleBuffer properties, I at least double the display
performance, but it's not enough

Is there something to do to override the Hide
and Show functions?

Maybe another solution is to load one assembly on one Panel with a
non-transparent background, and BringToFront the selected assembly?
Is BringToFront more performant than Hide and Show?

Thank you
Francois

*-----------------------*
Posted at:
www.GroupSrv.com
*-----------------------*
Nov 16 '05 #1
0 2073

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

Similar topics

5
4470
by: Steve | last post by:
Visual Studio 2003 C# Windows: I have a tree view control as my main menu control down the left side of my application. This has 2 Parent Nodes on it (Jobs and Employees). beneath these 2 main...
9
883
by: Robb Gilmore | last post by:
Hello, This is probably an easy one, but I have not been able to figure it out so far. I have a tab control on a windows forms app. Depending on some business logic, I need to hide/show some...
3
2573
by: Lynn | last post by:
Hello, I have a user control that contains a table, and some text fields. I would like to show or hide a particular row of this table, based on a selection the user makes on my page. Here's...
6
2163
by: Nestor | last post by:
Is this possible at all? I'm working on a Atlas project which at one point requires me to hide an ASP.net control with Javascripts running on the client side. Anyone able to provide any help on...
2
14611
by: UJ | last post by:
Is there a way with a asp:checkbox to run a JavaScript to display/hide text/input on the screen without doing a postback? I also need to be able to access the stuff at the server so I need to...
4
20989
by: devine | last post by:
Hi All, I am VERY new to Javascript. I have been provided with some code, which will enable me to hide/show a text area and change a submit button dependant on a check box. <!DOCTYPE html...
3
7709
by: | last post by:
I'm using the DataList and GridView controls, and I am trying to wrap my head around the problem of conditionally showing or hiding cells/cell content based on the presence or absence of DB data. I...
5
13266
by: Amit | last post by:
Can anyone write the code to hide tabpage of tab control in windows form 2.0 Thanks, Amit
2
1762
by: =?Utf-8?B?SmVzcGVyLCBEZW5tYXJr?= | last post by:
Hi, How can I query a Windows.Form control if it is hidden or not. I would like to toogle Hide/Show and not use a bool as control variable for this but simply query the form werther or not its...
0
7100
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
6964
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...
1
6842
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5434
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,...
1
4865
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3070
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1378
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
262
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.