In VB.Net , Form Opening is Very Slow?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ganeshvkl
    New Member
    • Jul 2008
    • 50

    In VB.Net , Form Opening is Very Slow?

    hi,
    My project is VB.net with Sql server 2000. i store image in database now the database size is around 400 MB. when i Click the form (image i have stored & Retrieved), it takes around 3 minutes to show the form , whereas other forms are working fine. ?

    Thanx in Adv
    Ganesh.
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Are you returning JUST the image you want to show, or ALL images and picking the one you want?

    Comment

    • ganeshvkl
      New Member
      • Jul 2008
      • 50

      #3
      hi ,
      Thanx For u'r Response.
      I 'm not loading any Images when the form is Display,the Images loaded in the grid depends on Customer Selection. Since the form is Slow?

      Bye.........
      Ganesh

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        Could you post some code on it?
        Specifically the form_load() function (and anything that it calls)
        And any details about any bound controls on the form?

        Comment

        • ganeshvkl
          New Member
          • Jul 2008
          • 50

          #5
          hi,
          My Code is in Form _Load

          Code:
          InitializeForm()
                  cboCustomer.DataSource = mdlGeneralFunctions.fnLoadCombo(CHR_CUSTOMER, BLN_FREQUENT)
                  SetComboProperties(cboCustomer, False, "Name", "intRecordNo")
                  SetComboProperties(cboCustomer, 500)
                  dtpFrom.Format = DateTimePickerFormat.Custom
                  dtpFrom.CustomFormat = "dd/MM/yyyy"
                  dtpFrom.Value = Microsoft.VisualBasic.DateAdd(DateInterval.Day, -31, Today)
                  dtpTo.Format = DateTimePickerFormat.Custom
                  dtpTo.CustomFormat = "dd/MM/yyyy"
                  dtpTo.Value = Today

          In that InitializeForm , I clear all Controls....

          Since It's Working Very Slow

          Ganesh

          Comment

          • Plater
            Recognized Expert Expert
            • Apr 2007
            • 7872

            #6
            InitializeForm( ) should be in the contructor, not in the form_load()
            See if that helps?
            I would guess though that it is your database call that is slowing everything down.

            Comment

            • ganeshvkl
              New Member
              • Jul 2008
              • 50

              #7
              hi plater,
              It's Working Fine..
              Thanx a Lot....

              Bye...
              Ganesh

              Comment

              Working...