473,386 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Form won't Update while program runs

I have a large program that in some respects is like a large Batch file. It
acquires data from servers, spreadsheets and ascii files and loads the final
output to a large set of spreadsheets.

To keep track of where it is in the long process, I put a list box on a form
and built a simple messaging system to load the activities and time of each.
The sub procedure that handles that requeries the control each time there is
a new action reported.

Everything works fine EXCEPT the list box does not update until the program
terminates. Then it suddenly fills with hundreds of transactions.

Any ideas how to get it to update the screen as the database gets updated.
(The list box is fed from a query against a db).

Is there a better way of getting the desired effect (IE timely notice of
activity).?

Thx
Kevin
Jan 1 '07 #1
2 1927
Kc-Mass wrote:
>I have a large program that in some respects is like a large Batch file. It
acquires data from servers, spreadsheets and ascii files and loads the final
output to a large set of spreadsheets.

To keep track of where it is in the long process, I put a list box on a form
and built a simple messaging system to load the activities and time of each.
The sub procedure that handles that requeries the control each time there is
a new action reported.

Everything works fine EXCEPT the list box does not update until the program
terminates. Then it suddenly fills with hundreds of transactions.

Any ideas how to get it to update the screen as the database gets updated.
(The list box is fed from a query against a db).

Is there a better way of getting the desired effect (IE timely notice of
activity).?

After the Requery, try using the Repaint method. If that
doesn't do it, try adding one or two DoEvent statements
before and/or after the Repaint.

--
Marsh
Jan 2 '07 #2
That worked like a charm. You're brilliant!
Thx

"Marshall Barton" <ma*********@wowway.comwrote in message
news:c6********************************@4ax.com...
Kc-Mass wrote:
>>I have a large program that in some respects is like a large Batch file.
It
acquires data from servers, spreadsheets and ascii files and loads the
final
output to a large set of spreadsheets.

To keep track of where it is in the long process, I put a list box on a
form
and built a simple messaging system to load the activities and time of
each.
The sub procedure that handles that requeries the control each time there
is
a new action reported.

Everything works fine EXCEPT the list box does not update until the
program
terminates. Then it suddenly fills with hundreds of transactions.

Any ideas how to get it to update the screen as the database gets updated.
(The list box is fed from a query against a db).

Is there a better way of getting the desired effect (IE timely notice of
activity).?


After the Requery, try using the Repaint method. If that
doesn't do it, try adding one or two DoEvent statements
before and/or after the Repaint.

--
Marsh

Jan 2 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Fred Hebert | last post by:
I am trying to use a 3rd party DLL that requires the main window handle as a parameter. e.g. MyFunc(WHND MyHandle); The example looks something like this: Result = MyFunc(Handle); Where...
13
by: Ioannis Vranos | last post by:
Why in this code the form *does not refresh* when it gets the focus/after some time? #using <mscorlib.dll> #using <system.windows.forms.dll> #using <system.dll> #using <system.drawing.dll>
1
by: oscar | last post by:
my program draws a form and when you click the start button another form is drawn with a progress bar as it runs through a function. my issue is that when you click on another progrem then try to...
0
by: B-Dog | last post by:
We have a form that has a dataset on it and we send commands through tcp to tell each program to update their database but we are running into problems when it runs the update below it locks up the...
3
by: Rob | last post by:
Can a form be opened from a Windows service? I have a windows service that I would like to open a form from a notify icon. I cannot get the Notify Icon to display nor can I open a form. Any...
5
by: ortaias | last post by:
I have a form which calls up a second form for purposes of data entry. When closing the data entry form and returning to the main form, things don't work as expected. When I return to the main...
5
by: Miro | last post by:
I will try my best to ask this question correctly. I think in the end the code will make more sence of what I am trying to accomplish. I am just not sure of what to search for on the net. I...
14
by: Professor Yonce | last post by:
I have made form for E-Mail. I have entered code but the Import system does not work. It has squiggly line underneath it showing it is not communicating. It Will not build. Public Class...
10
beacon
by: beacon | last post by:
Hi everybody, This is probably going to sound unorthodox, but I have to log records that are deleted...I know, go figure. Anyway, I have a form with a (continuous) subform, and on the subform I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.