• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 421
  • Last Modified:

multiprocessing script

everytime I create a process it waits for it to be completed...

Is there a way I can, for instance connect to a database, get a bunch results and while its doing that constantly change a message on the screen in a textbox?

I dont know what I am doing wrong in general (no specific piece of code) but when I write code it just stalls... for instance if I create a database connection to retrieve a bunch of records, and I physically drag the form box around the screen it seems frozen until its done processing.

Any help appreciated.
0
B_Dorsey
Asked:
B_Dorsey
  • 3
  • 2
1 Solution
 
YiogiCommented:
What version of Visual Basic are you using? If dotnet you can create a backgroundworker (the easy way) or program it to start a new thread by yourself (the slightly harder but my preferred way)
0
 
B_DorseyAuthor Commented:
VB6 ... new thread?
0
 
YiogiCommented:
Yup new thread. I can't help you much with VB6 as I never did it but simply googling it up came up with this:
http://www.freevbcode.com/ShowCode.Asp?ID=1287

It basically has all the info to create a new thread in those obsolete versions :). I have only done threads with Delphi and DotNet programming languages. VB6 was never something I liked, so never did anything but write macros with it.
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
RobSampsonCommented:
I'm not much of a VB6 programmer, but before you run your query, if you put
DoEvents

then while you're looping of the recordset it should "repaint" the screen.

It is apparently processor intensive though....

Regards,

Rob.
0
 
YiogiCommented:
Yup DoEvents basically executes any pending windows events before continuing. I do dislike it though.
0
 
B_DorseyAuthor Commented:
thanks, took a while to readup on all that, there has to be a better way :(
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now