Improve Performance of windows Form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Vyas111111
    New Member
    • Sep 2007
    • 13

    Improve Performance of windows Form

    Hello all
    I have a windows form,in this page I am creating lots of controls at runtime.So when my form is load it takes time to load all controls.How can i improve performance of that page.I have Call the InitializeCompo net() function in constructor of the class.
  • Shashi Sadasivan
    Recognized Expert Top Contributor
    • Aug 2007
    • 1435

    #2
    Originally posted by Vyas111111
    Hello all
    I have a windows form,in this page I am creating lots of controls at runtime.So when my form is load it takes time to load all controls.How can i improve performance of that page.I have Call the InitializeCompo net() function in constructor of the class.
    Have a look at this

    Gives a few tips on what to do!

    cheers

    Comment

    • SammyB
      Recognized Expert Contributor
      • Mar 2007
      • 807

      #3
      Originally posted by Shashi Sadasivan
      Have a look at this

      Gives a few tips on what to do!

      cheers
      Great link! Thanks! --Sam

      Comment

      • Vyas111111
        New Member
        • Sep 2007
        • 13

        #4
        Originally posted by SammyB
        Great link! Thanks! --Sam
        Actually i have lots of control in a panel.and when the form is loaded flicker problem is there.I want to do flicker free painting.

        Comment

        • Shashi Sadasivan
          Recognized Expert Top Contributor
          • Aug 2007
          • 1435

          #5
          Originally posted by Vyas111111
          Actually i have lots of control in a panel.and when the form is loaded flicker problem is there.I want to do flicker free painting.
          The link says.....double buffering..down load the sample....it looks good :)
          cheers

          Comment

          • Vyas111111
            New Member
            • Sep 2007
            • 13

            #6
            Originally posted by Shashi Sadasivan
            The link says.....double buffering..down load the sample....it looks good :)
            cheers
            I have done double buffering in my code,but still i got flickering effect when form loads

            Comment

            • SammyB
              Recognized Expert Contributor
              • Mar 2007
              • 807

              #7
              Originally posted by Vyas111111
              I have done double buffering in my code,but still i got flickering effect when form loads
              Do you use the SuspendLayout method on all of you container controls before adding the controls to them? Then, after all of the controls have been added,

              Comment

              • Vyas111111
                New Member
                • Sep 2007
                • 13

                #8
                Originally posted by SammyB
                Do you use the SuspendLayout method on all of you container controls before adding the controls to them? Then, after all of the controls have been added,
                Thanks For the reply
                Yes I have used SusPendLAyout() methode.But still I am facing same problem

                Comment

                • Killer42
                  Recognized Expert Expert
                  • Oct 2006
                  • 8429

                  #9
                  Originally posted by Vyas111111
                  Yes I have used SuspendLayout() method. But still I am facing the same problem.
                  Perhaps you could just hold off on displaying the form until the controls have been created?

                  Comment

                  • hbxtlhx
                    New Member
                    • Sep 2007
                    • 10

                    #10
                    decrease controls and using listview, datagrid etc

                    Comment

                    • Killer42
                      Recognized Expert Expert
                      • Oct 2006
                      • 8429

                      #11
                      delete form, dynamite computer, etc.

                      Comment

                      • Killer42
                        Recognized Expert Expert
                        • Oct 2006
                        • 8429

                        #12
                        Or alternatively, what about creating more of the controls at design time, then just modifying their properties at runtime?

                        Comment

                        Working...