-----------------------------------------------------------

New Message on MumbaiUserGroup

-----------------------------------------------------------
From: aamirOnline
Message 2 in Discussion

Hi  Its good that you use release the memory by IDisposable.Dispose() and 
GC.Collect(). still there are couple of things to be considered for improving the 
performance of the application.     First thing - Designer not always generates an 
optimized code. Its alwas better to design forms ourselves.
        If you design a form, dont initialize the property which are not necessary. 
always try to use default properties.
        Reduce the method call - for example

    this.textBox1.Location = new Point(10,20);
    this.textBox1.Size =new Size(72,23);

This can be consolidated into a single method call by using the Bounds property:

    this.textBox1.Bounds = new Rectangle(10,20,72,23);

This will reduce the memory utilization
        If the form has too many controls try to split from in multiple form. while 
displaying new form dispose old form.
        Another method for improving performance is to initialize the controls in the 
control tree top-down. For example, if you have a panel control with many controls in 
it, create the panel first, and then add the controls to the panel. Also, setting the 
parent property of the control instead of adding to the Controls collection can 
improve performance.
        And finally if perfomance is critical issue for you always try to check 
loading time or execution time by utilizing Environment.TickCount property 
I hope these guidelines will help you out 
regards
m aamir maniar 
     

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/mumbaiusergroup/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to