473,725 Members | 2,276 Online
Bytes | Software Development & Data Engineering Community
+ 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.Creat eInstance, 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(Contro lStyles.UserPai nt, true);
SetStyle(Contro lStyles.AllPain tingInWmPaint, true);
SetStyle(Contro lStyles.DoubleB uffer, 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 2098

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

Similar topics

5
4509
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 functions I have 2 sub functions under each("Add Job", "View Jobs" and "Add User", "View Users"). I have theses subfunctions grouped in a TabControl, so there are 2 TabControl objects on my main screen, each with 2 pages on. When the user...
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 of the individual tabs. The tab page has no "visible" property. The tabpage class has a "hide" method, but this does not seem to make it disappear. I have been able to remove them via something like this:
3
2608
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 the situation...I have a page that has some panels that are hidden. The first panel is visible...the user selects a city, and presses submit. The next panel is made visible, and in this panel I have placed a user
6
2176
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 this? Thanks.
2
14647
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 have run=server with it. TIA - Jeff.
4
21016
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 PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
3
7729
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 am finding this sort of problem by far the most annoying part about working with ASP.NET controls. What I want is to know how to do three things: - conditionally show or hide an ImageField +column+ based on whether or not an the...
5
13299
by: Amit | last post by:
Can anyone write the code to hide tabpage of tab control in windows form 2.0 Thanks, Amit
2
1780
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 hidden. regards than thanks Jesper.
0
8752
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9257
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9179
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8099
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6702
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3228
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 we have to send another system
2
2637
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.