|
Hi Hubert
If I were you, I'd set the Trace.WriteLine statements at the beginning and end inside the InitializeComponent method.
Then move the Trace.WriteLine "end" halfway up, then halfway again, etc. until you find THE line that takes all the time.
I'm pretty sure there is one or two single lines taking up all the time.
Let me know when you're closer to the problem.
Kind regards - Jakob
*********************************************
Three kinds of people in the world:
- Those who can count..
- Those who can't!
10 kinds of people in the world:
- Those who understand binary
- Those who don't
|
|
|
|
|
Jakob Lund Krarup wrote: there is one or two single lines taking up all the time.
Yes! I have probably found it. I decided to comment following line from the InitializeComponent method:
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
Application needs just 1 second to show SplashForm now, so it is 4 times better than in the early begining of the optimalization.
But I don't have idea how to set icon and image in the picturebox faster than loading from resources. I don't want to have them in separate files in the app directory - I think it is not profesional.
Best regards
Hubert
|
|
|
|
|
Hm.... weird!
Is it a homemade icon..? There may be some bug in the icon file.
Try setting the icon to the standard icon and check again for speed comparison.
Kind regards - Jakob
*********************************************
Three kinds of people in the world:
- Those who can count..
- Those who can't!
10 kinds of people in the world:
- Those who understand binary
- Those who don't
|
|
|
|
|
I've noticed that getting data from a resource can be expensive. IIRC it tries to locate explicit resources for the current language (such as en-us)in a subfolder and takes a file not found exception if it's missing, and then goes on to do a lot of other stuff too. If you run a profiler on the code you'd see some of this going on by looking at the objects that get created behind your back.
Phil Wilson
|
|
|
|
|
Sorry for long time no answer, I am still in time-tracing business
Loading icon from external file (plain .ico) takes near no time. Loading it from the dll's resources takes 4 seconds. The same situation is with any other bitmap. I am sure it is my mistake but question is WHAT'S WRONG?
Phil Wilson wrote: If you run a profiler on the code you'd see some of this going on by looking at the objects that get created behind your back.
Do you mean MS CLR Profiler?
I have downloaded and tried CLR Profiler from Microsoft, however it doesn't work with my project. I run the CLR Profiler, loaded and started my app and bang - the profiler shuts down without any message. Have you noticed such kind of behaviors?
Hubert
|
|
|
|
|
Frndz,
I have a image control of type html in DotNet2.0.
I want to create the object of that HTMLImage control in my codebehind.
This is how I try creating the object the HTMLImage object
CType(Me.FindControl("ctl00_cphMaster_imgDate"), HtmlImage).Disabled = True
My control and its runtime generated name is listd below:
Control Script code in aspx page:
Client side script code at runtime:
One of my most memorable & embarrasing moment in Chenoa was Chaitanya's joining party.
Regards,
Vipul Mehta
|
|
|
|
|
Hi,
I have a C#.net application. I have two C++ dlls with same name (but different version numbers that i see in the dll). When I use Dll Import to invoke methods on each dll separately in two different applications, all the methods in both the c++ dlls work fine.
But if i tend to use dll import and invoke the functions in the two dlls, the first dll's methods are executing fine but when the second dll's methods are invoked, there is an error stating "cannot load the second dll. method not found".
I wonder if it is something to do with loading two same named dlls in the same memory of an exe...
Please help in identifying the cause and kindly clarify my doubt.
Many Thanks.
|
|
|
|
|
Please don't cross post.
---
b { font-weight: normal; }
|
|
|
|
|
I am dealing with something related to .NET and C# and wonder about your comment. Hope you are clear in understanding my problem.
|
|
|
|
|
By cross posting you minimize your chances of getting relevant help, partly because you annoy other people, partly because you don't use the message boards in the best way.
If you feel that you have to draw attention to the question from different message boards, post the question in the most relevant board, and post links to the question in the other boards. That way you get the replies in a single thread, and people can see what other have replied so that they can cooperate in helping you.
---
b { font-weight: normal; }
|
|
|
|
|
Is there any "approved" method of controlling the order in which delegates are invoked when an event occurs, other adding them to the event in the "right order".
Phil Daniels
|
|
|
|
|
You could try delegating the delegate such that the there is exactly one delegate within the event and the other delegates are called by this ?
event calls B (single)
B calls others in the desired order. The other delegates could be internally maintained, perhaps as using a order::delegate value in a Dictionary
[?]
namaste,
Nitin
|
|
|
|
|
I've done something similar, which is to create another event that's fired first, the two hi-priority delegates subscribe to it, the rest subscribe to the other event which is fired (ie the On.... method is invoked) after the first is done. It'll do for now.
Thanks for your assist - rgds phild
|
|
|
|
|
Hi,
Im creating Setfile for my Windows application and i can able to install it after creation, i want to add uninstallation option also with this how can i do it.
Thanks in Advance...
|
|
|
|
|
You don't. It is already handled by Windows Installer, look at your Add/Remove programs.
only two letters away from being an asset
|
|
|
|
|
I have done my project in .net
When i run my defualt.aspx, sometime it will show runtime error at web config. But sometime it will not.
What will this issue cause by?
the description of my error is:
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
|
|
|
|
|
Try following in your web.config file and you should be able to see more descriptive error.
customErrors mode="Off"
|
|
|
|
|
Hello there
I had this fun idea about writing a program were you can set rights on other accounts(if you are admin etc), and also list what accounts exists on the computer. Everything I intend to do you can already do in windows xp but I want to do it anyway and do it in my program instead. One example would be to set account x so you cannot login afer 10pm.
Problem is, I know very little about what I suspect is needed to do that. I'm suspecting I will have to manipulate the windows shell in some way perhaps?
Anyway, if anyone has any suggestions were I could start looking for information or suggestions how to do this feel free to reply. I know mostly c# but have played around with c/c++ and I guess I could learn it again if needed.
|
|
|
|
|
|
the upper one is the JavaScript code and the lower one in HTML code that I am using in ASPX file for applying the onmouseover functionality on the login button.
Now I would like to use this button (login) as to navigate to some other page (main.aspx ) after clicking it.
Can somone please tell me the function that I should write in the codebehind page for doing as above................ (I am working in C#)
|
|
|
|
|
Use an imagebutton and handle the onclick event to redirect to a new page.
only two letters away from being an asset
|
|
|
|
|
Is it possible to compile and run my .NET code in .NET 1.1 and .NET2.0 both???
Actually while compiling my code in .NET 2.0, which has been developed in .NET 1.1 getting these errors
Error 1 Warning as Error: 'System.Web.UI.Page.RegisterClientScriptBlock(string, string)' is obsolete: 'Use ClientScript.RegisterClientScriptBlock(string key, string script) instead. http://go.microsoft.com/fwlink/?linkid=14202' D:\FileManagerLibrary\Controls\FileManagerTree.cs 147 4 FileManagerLibrary
Error 201 Warning as Error: 'System.Configuration.ConfigurationSettings.AppSettings' is obsolete: 'This method is obsolete, it has been replaced by ConfigurationManager.AppSettings' D:\FileManagerLibrary\Util.cs 173 22 FileManagerLibrary
Error 175 Warning as Error: 'System.Web.UI.Page.RegisterClientScriptBlock(string, string)' is obsolete: 'Use ClientScript.RegisterClientScriptBlock(string key, string script) instead. http://go.microsoft.com/fwlink/?linkid=14202' D:\FileManagerLibrary\Controls\FileManagerSearchView.cs 563 4 FileManagerLibrary
Anyone please help
Thanks in advance.
|
|
|
|
|
You can run an application written with 1.1 in a 2.0 environment. Your application will still run, these are just warning, however as indicated there are newer methods in 2.0.
only two letters away from being an asset
|
|
|
|
|
Hi,
I would have thought finding a decent WinForms text editor control was a no-brainer when I started my most recent project, but there seem to be no mid-range text editors (RTF or otherwise) on the market at prices I can afford or feel good about paying.
Perhaps my needs just fall into a gray zone in the market, but here's what I'd like to get without spending $600 or more:
1. Should support bullets and numbering (multi-indent)
2. Should support standard formatting (right/left/center justify; indent, outdent etc.)
3. Should support drag and drop
4. Should support standard text decoration (font, bold, italic, fore-color, back-color)
I've gone a fair way to just building one myself, but the subtleties of RTF are a constant drain on my time - particularly things like numbered bullets and multi-level (indented) bullets; I'd really rather just buy something and get on with it since the text editor is a small part of the overall project. It doesn't make sense to take on the responsibility of authoring and fully testing a component like this when it really only makes up a small percentage of my application's features.
Any helpful suggestions are welcome and appreciated. Thanks for your help.
P.S. Yes, I've looked at TX Edit, PinEdit WP and their contemporaries. They're really nice products, but pretty expensive and they tend to be a little too feature-rich for my needs. What I would really like would be something along the lines of FreeTextBox for WinForms.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Hello,
Is it possible for C# projects and C++ projects share the same library (that's written in either C++/C# also)? By this I mean that the library will contain exposed methods which are accessible by both the C# and C++ projects.
How do you do this?
Thanks,
~Rafferty
|
|
|
|