473,791 Members | 2,807 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

400 usercontrols to display take too much time - any solution?

hello,

I am developing a boardgame, with a large number of customed
usercontrols ( e.g. 20 X 20 = 400 ).
I find it very usefull to use usercontrols, as they can contains
specific properties and methods, but it makes the application very
slow to redraw, even if I redraw only a small subset of them.

Is there a way to speed up the drawing time? I included in my codes
those lines:

this.SetStyle(C ontrolStyles.Do ubleBuffer, true);
this.SetStyle(C ontrolStyles.Al lPaintingInWmPa int, true);
this.SetStyle(C ontrolStyles.Us erPaint, true);

but it does not really help.

Is there a way to remove all unused standard methods of the
usercontrol? Any suggestions?

thx,

picander
Nov 16 '05 #1
2 1247
The presence of a lot of methods won't have an appreciable impact on
performance -- in fact, as far as I know, no impact other than large code
size taking memory away from other things, but remember, unlike with
instance data, there is just one copy of the code in memory per class, not
per instance. And if you don't call a given method, it's never JITted, so
there shouldn't be any overhead there.

Are you certain that drawing time is the bottleneck? There could be a lot
of other sources of the problem. If you haven't already, do some profiling
to see what is really soaking up the time. And be sure to profile and
benchmark in a non-debug version.

--Bob

"Picander" <pi********@yah oo.de> wrote in message
news:88******** *************** **@posting.goog le.com...
hello,

I am developing a boardgame, with a large number of customed
usercontrols ( e.g. 20 X 20 = 400 ).
I find it very usefull to use usercontrols, as they can contains
specific properties and methods, but it makes the application very
slow to redraw, even if I redraw only a small subset of them.

Is there a way to speed up the drawing time? I included in my codes
those lines:

this.SetStyle(C ontrolStyles.Do ubleBuffer, true);
this.SetStyle(C ontrolStyles.Al lPaintingInWmPa int, true);
this.SetStyle(C ontrolStyles.Us erPaint, true);

but it does not really help.

Is there a way to remove all unused standard methods of the
usercontrol? Any suggestions?

thx,

picander

Nov 16 '05 #2
If you create custom graphical objects, that know how to draw and hit test,
they will be much faster than controls. This way you use only a single
control.

Regards,
Frank Hileman

check out VG.net: http://www.vgdotnet.com
Animated vector graphics system
Integrated Visual Studio .NET graphics editor

"Picander" <pi********@yah oo.de> wrote in message
news:88******** *************** **@posting.goog le.com...
hello,

I am developing a boardgame, with a large number of customed
usercontrols ( e.g. 20 X 20 = 400 ).
I find it very usefull to use usercontrols, as they can contains
specific properties and methods, but it makes the application very
slow to redraw, even if I redraw only a small subset of them.

Is there a way to speed up the drawing time? I included in my codes
those lines:

this.SetStyle(C ontrolStyles.Do ubleBuffer, true);
this.SetStyle(C ontrolStyles.Al lPaintingInWmPa int, true);
this.SetStyle(C ontrolStyles.Us erPaint, true);

but it does not really help.

Is there a way to remove all unused standard methods of the
usercontrol? Any suggestions?

thx,

picander

Nov 16 '05 #3

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

Similar topics

0
1923
by: Matrix - MAM | last post by:
Hi, We are usiing datagrid Web Server contol in our Web Application. We've set tooltip property for one column of datagrid. It is working fine. But the problem is the tool tip message disappears so quickly. I'm wondering is it possible to increase the tool tip display time of Wer Server Control in ASP.NET Web Application. If not could you provide us some suggesstion. thanks in advance. -Chitra
1
2707
by: karanam ravi kiran via DotNetMonster.com | last post by:
hi friends, i am fresher in the world of .net, i have problem to display time in asp.net web continuously. i want to display time on the form like the "live timer on windows task bar" plz help me over this thing thank you ".net Monster" --
5
2102
by: japin0 | last post by:
This code below suppose to display time of my PC on the web but it doesnt ..it just echos "Hello W3Schools!" <html> <body bgcolor="yellow"> <center> <h2>Hello W3Schools!</h2> <p><%Response.Write(now())%></p> </center>
6
1437
by: Xavier | last post by:
hello, what is the best way to display display the time needed for rendering the information. I must get the difference of time from the start of rendering till the finish rendering the page - but any ideas how to do it? My customer want to have such a info on every page, somthing like 0,12 sek best regards
4
32830
by: Ren | last post by:
Hi all, I am trying to display the current time including milliseconds (two digits only). So for example the current time will have Hour : Minute : Second : Millisecond. Example: 15:25:05:03 (This would represent 3:25pm) Just to clarify the millisecond will be similar to what is shown on a stopwatch. So once you get past 99 milliseconds the second will go up by 1.
1
1301
by: VB Programmer | last post by:
I want to display the Live time in New York and Hong Kong on my website. Any suggestions on how to display these live clocks? I suppose some client side scripting is necessary because I don't want to keep having to refresh the page... Thanks!
0
1110
by: Stefan L | last post by:
Hi everybody! I was just starting to use partial classes in my projects, but it is kind of anoying that the VS solution explorer displays the files flat in the hierachy rather than nested. Example: I have a file (and class) Foo.cs that I want to split in a main part and a part, where extrenal interfaces are implemented (maybe Foo.interfaces.cs). How can I tell VS to display Foo.interfaces.cs nested under Foo.cs (like the *.Designer.cs...
1
2798
by: vchezel | last post by:
Hi, I did a project in c++ to do file operations.The output of the program would be like this File create\File1_1 created File create\File1_1 Copied to copy\FileDest_1 File copy\FileDest_1 (6302 Bytes) Renamed to copy\File2_1 (6302 Bytes) Files create\File1_1 and copy\File2_1 are equal ............................. I would like to append time to the output. I tried to use the time function, it displays only the current time. I want to...
3
2925
by: timhoagland | last post by:
Hi, I have a C++ data acquisition program, running under Linux. The basic stucture is: Setup devices Acquire data for x seconds. Cleanup. The problem is that I don't have a way to determine how long the data
1
11998
by: noorcsharp | last post by:
how to display time in a label in c#.net in this format hh:mm:ss
0
9669
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9515
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
10426
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
9029
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
7537
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
6776
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
4109
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
3713
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2913
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.