Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Running an application asynchronously

Running an application asynchronously

Scheduled Pinned Locked Moved Visual Basic
databasequestion
8 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    devans123456
    wrote on last edited by
    #1

    Hello, I currently have an application that when running, has to load a lot of data and it takes too much time. The data is coming from a SQL database. I am not very familiar with async and was wondering if there is a way to run the application asynchronously through the Init() method? Thank you.

    D 1 Reply Last reply
    0
    • D devans123456

      Hello, I currently have an application that when running, has to load a lot of data and it takes too much time. The data is coming from a SQL database. I am not very familiar with async and was wondering if there is a way to run the application asynchronously through the Init() method? Thank you.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      That doesn't make any sense. Are you asking if you can load the data on a background thread while your application finishes starting up??

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007, 2008
      But no longer in 2009...

      D 1 Reply Last reply
      0
      • D Dave Kreskowiak

        That doesn't make any sense. Are you asking if you can load the data on a background thread while your application finishes starting up??

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008
        But no longer in 2009...

        D Offline
        D Offline
        devans123456
        wrote on last edited by
        #3

        Sorry. I am not very good at trying to explain. But basically my application takes a very long time to load and was looking into trying to load it asynchronously through the Init() method because this method calls the different connection strings. Or could even have it load the data on a background thread like you mentioned, but I am unsure of how this is accomplished.

        L 1 Reply Last reply
        0
        • D devans123456

          Sorry. I am not very good at trying to explain. But basically my application takes a very long time to load and was looking into trying to load it asynchronously through the Init() method because this method calls the different connection strings. Or could even have it load the data on a background thread like you mentioned, but I am unsure of how this is accomplished.

          L Offline
          L Offline
          led123
          wrote on last edited by
          #4

          Currently the project is taking a tremendous amount of time to load. And we are required to have a loading image showing while the application is accessing the data from the database. The code below is where the asynchronous code should be placed so I am being told by my fellow co-workers. Public Sub Init(ByVal solution As Solution) LoadingDataSymbol.Visible = True _presenter = New TranslationPresenter(Me) _presenter.getProjects(solution) End Sub This code sets the image visible and gets the data from using getProjects(solution). I am required to make these two items async and turn the image visible before and invisible after. Any suggestions???

          D 1 Reply Last reply
          0
          • L led123

            Currently the project is taking a tremendous amount of time to load. And we are required to have a loading image showing while the application is accessing the data from the database. The code below is where the asynchronous code should be placed so I am being told by my fellow co-workers. Public Sub Init(ByVal solution As Solution) LoadingDataSymbol.Visible = True _presenter = New TranslationPresenter(Me) _presenter.getProjects(solution) End Sub This code sets the image visible and gets the data from using getProjects(solution). I am required to make these two items async and turn the image visible before and invisible after. Any suggestions???

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            Look into the BackgroundWorker component in the ToolBox.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007, 2008
            But no longer in 2009...

            L 1 Reply Last reply
            0
            • D Dave Kreskowiak

              Look into the BackgroundWorker component in the ToolBox.

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007, 2008
              But no longer in 2009...

              L Offline
              L Offline
              led123
              wrote on last edited by
              #6

              How would that be incorporated in the code that I had just posted?

              D 1 Reply Last reply
              0
              • L led123

                How would that be incorporated in the code that I had just posted?

                D Offline
                D Offline
                Dave Kreskowiak
                wrote on last edited by
                #7

                You drop the component on the form, then in your Init code for the form, setup the event handlers, then send it on it's way. Read this...[^]

                A guide to posting questions on CodeProject[^]
                Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                     2006, 2007, 2008
                But no longer in 2009...

                L 1 Reply Last reply
                0
                • D Dave Kreskowiak

                  You drop the component on the form, then in your Init code for the form, setup the event handlers, then send it on it's way. Read this...[^]

                  A guide to posting questions on CodeProject[^]
                  Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                       2006, 2007, 2008
                  But no longer in 2009...

                  L Offline
                  L Offline
                  led123
                  wrote on last edited by
                  #8

                  Thank you! :-D

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups