473,406 Members | 2,390 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,406 software developers and data experts.

Update/Refresh Problem

I have a simple app that grabs records from a database and steps through
them processing each record. I have three text fields on the form to give
the user feedback on the progress.

With each new record I update the three fields on the form with the
information from the current record. I initially wasn't getting the fields
updated, so I added a .refresh() for each field as new data was added.

The problem is when the form loses focus, it stops updating. If I minimize
the form while it's processing records and then restore it, the user
interface is not updated any more. It stays at the last state before it was
minimized.

Any suggestions on how to keep the user interface updating when it's
restored of if its covered by another window and then re-exposed?

Thanks,
Bernie
Mar 20 '06 #1
6 2727
Bernie,

Do you have any idea how we can try to help you if we don't even know what
from what your UI exist.

To give you an example what can help in that.

Is it a webpage, an PDA, a windowsform. etc.
Where have you stored the grabbed records etc.
Is your UI a textbox a couple of textboxes, a datagrid etc.
Are you using version 2002, 2003, 2005

We are not interested to know that you are using Windows XP, an Intel
processor, etc.

Cor
"Bernie Hunt" <bh***@optonline.net> schreef in bericht
news:Xn*******************************@207.46.248. 16...
I have a simple app that grabs records from a database and steps through
them processing each record. I have three text fields on the form to give
the user feedback on the progress.

With each new record I update the three fields on the form with the
information from the current record. I initially wasn't getting the fields
updated, so I added a .refresh() for each field as new data was added.

The problem is when the form loses focus, it stops updating. If I minimize
the form while it's processing records and then restore it, the user
interface is not updated any more. It stays at the last state before it
was
minimized.

Any suggestions on how to keep the user interface updating when it's
restored of if its covered by another window and then re-exposed?

Thanks,
Bernie

Mar 20 '06 #2
"Bernie Hunt" <bh***@optonline.net> schrieb
I have a simple app that grabs records from a database and steps
through them processing each record. I have three text fields on the
form to give the user feedback on the progress.

With each new record I update the three fields on the form with the
information from the current record. I initially wasn't getting the
fields updated, so I added a .refresh() for each field as new data
was added.

The problem is when the form loses focus, it stops updating. If I
minimize the form while it's processing records and then restore it,
the user interface is not updated any more. It stays at the last
state before it was minimized.

Any suggestions on how to keep the user interface updating when it's
restored of if its covered by another window and then re-exposed?

You ran across an ugly behavior in WindowsXP: Even calling refresh is
ignored. Reason: Read 3rd paragraph at
http://msdn.microsoft.com/library/en...sagequeues.asp

see also:
http://groups.google.com/group/micro...1d3b0355269ec2

ARmin

Mar 20 '06 #3
The form is a windows form, it has three text boxes for outputing fields
from the records, two combo boxes for setting up parameters for the sql
query and a button to start the query.

The records are selected with a datareader and after they have been read
are discarded. Each record is read into a group of variables that will be
used to create records in a table in a typed dataaset, but right now the
variables get created and then destroyed for the next record. This is a
test of concept app for me in learning VB.net.

I'm using VS 2003.

Bernie
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in
news:uG**************@TK2MSFTNGP11.phx.gbl:
Bernie,

Do you have any idea how we can try to help you if we don't even know
what from what your UI exist.

To give you an example what can help in that.

Is it a webpage, an PDA, a windowsform. etc.
Where have you stored the grabbed records etc.
Is your UI a textbox a couple of textboxes, a datagrid etc.
Are you using version 2002, 2003, 2005

We are not interested to know that you are using Windows XP, an Intel
processor, etc.

Cor
"Bernie Hunt" <bh***@optonline.net> schreef in bericht
news:Xn*******************************@207.46.248. 16...
I have a simple app that grabs records from a database and steps
through
them processing each record. I have three text fields on the form to
give the user feedback on the progress.

With each new record I update the three fields on the form with the
information from the current record. I initially wasn't getting the
fields updated, so I added a .refresh() for each field as new data
was added.

The problem is when the form loses focus, it stops updating. If I
minimize the form while it's processing records and then restore it,
the user interface is not updated any more. It stays at the last
state before it was
minimized.

Any suggestions on how to keep the user interface updating when it's
restored of if its covered by another window and then re-exposed?

Thanks,
Bernie



Mar 20 '06 #4
Bernie,

I have sent you a sample in another newsgroup, have a look at this first, I
thought that some of your questions are in that.

Cor

"Bernie Hunt" <bh***@optonline.net> schreef in bericht
news:Xn*******************************@207.46.248. 16...
The form is a windows form, it has three text boxes for outputing fields
from the records, two combo boxes for setting up parameters for the sql
query and a button to start the query.

The records are selected with a datareader and after they have been read
are discarded. Each record is read into a group of variables that will be
used to create records in a table in a typed dataaset, but right now the
variables get created and then destroyed for the next record. This is a
test of concept app for me in learning VB.net.

I'm using VS 2003.

Bernie
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in
news:uG**************@TK2MSFTNGP11.phx.gbl:
Bernie,

Do you have any idea how we can try to help you if we don't even know
what from what your UI exist.

To give you an example what can help in that.

Is it a webpage, an PDA, a windowsform. etc.
Where have you stored the grabbed records etc.
Is your UI a textbox a couple of textboxes, a datagrid etc.
Are you using version 2002, 2003, 2005

We are not interested to know that you are using Windows XP, an Intel
processor, etc.

Cor
"Bernie Hunt" <bh***@optonline.net> schreef in bericht
news:Xn*******************************@207.46.248. 16...
I have a simple app that grabs records from a database and steps
through
them processing each record. I have three text fields on the form to
give the user feedback on the progress.

With each new record I update the three fields on the form with the
information from the current record. I initially wasn't getting the
fields updated, so I added a .refresh() for each field as new data
was added.

The problem is when the form loses focus, it stops updating. If I
minimize the form while it's processing records and then restore it,
the user interface is not updated any more. It stays at the last
state before it was
minimized.

Any suggestions on how to keep the user interface updating when it's
restored of if its covered by another window and then re-exposed?

Thanks,
Bernie


Mar 20 '06 #5
Armin,

Your the wizard!

I used your recommondation to call PeekMessage and I also added a
Me.Refresh to keep the form refreshed on redisplay. Now my only problem
is the form does not return to focus if I click the blue bar at the top.
The minimize and maximize button do not work either. Does it sound like I
missed something?

I think I may also need to play around with how often I refresh and
PeekMessage. With 11K records to process I don't want to waste overhead
on refreshing too much, especially if the user can't see the change
anyway.

Interesting reading on the MSDN article.

Bernie
Who has a lot to learn!
"Armin Zingler" <az*******@freenet.de> wrote in
news:ey**************@TK2MSFTNGP12.phx.gbl:
"Bernie Hunt" <bh***@optonline.net> schrieb
I have a simple app that grabs records from a database and steps
through them processing each record. I have three text fields on the
form to give the user feedback on the progress.

With each new record I update the three fields on the form with the
information from the current record. I initially wasn't getting the
fields updated, so I added a .refresh() for each field as new data
was added.

The problem is when the form loses focus, it stops updating. If I
minimize the form while it's processing records and then restore it,
the user interface is not updated any more. It stays at the last
state before it was minimized.

Any suggestions on how to keep the user interface updating when it's
restored of if its covered by another window and then re-exposed?

You ran across an ugly behavior in WindowsXP: Even calling refresh is
ignored. Reason: Read 3rd paragraph at
http://msdn.microsoft.com/library/en...wsuserinterfac
e/windowing/messagesandmessagequeues/aboutmessagesandmessagequeues.asp

see also:
http://groups.google.com/group/micro...nguages.vb/bro
wse_frm/thread/1682ea1a86cec239/301d3b0355269ec2

ARmin


Mar 20 '06 #6
"Bernie Hunt" <bh***@optonline.net> schrieb
Armin,

Your the wizard!

I used your recommondation to call PeekMessage and I also added a
Me.Refresh to keep the form refreshed on redisplay. Now my only
problem is the form does not return to focus if I click the blue bar
at the top. The minimize and maximize button do not work either.
Does it sound like I missed something?

I think I may also need to play around with how often I refresh and
PeekMessage. With 11K records to process I don't want to waste
overhead on refreshing too much, especially if the user can't see
the change anyway.

Interesting reading on the MSDN article.


Peekmessage is only a work-around to be able to update the display easily.
As the thread is still doing the work, there is no time to process messages
like mouse clicks or keyboard input. If you want to work with your Form
while the process is going on, you should consider putting the work into a
separate thread.
Armin

Mar 20 '06 #7

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

Similar topics

2
by: Lo?c Mah? | last post by:
Hello I have a problem to update the content of a wx.Panel already displayed after changing a variable, used to define the wx.Panel content. I have the following elements in my code: ...
2
by: Niyazi | last post by:
Hi, I have not understand the problem. Before all the coding with few application everything worked perfectly. Now I am developing Cheque Writing application and when the cheque is clear the...
2
by: aldous scotch | last post by:
I designed a Crystal Report .rpt from within Microsoft Development Environment 2003 Version 7.1.3088 (VB .NET IDE). I selected database fields from the left side Field Explorer onto the Details...
8
by: Zorpiedoman | last post by:
I keep getting a concurrency exception the second time I make a change and attempt to update a dataadapter. It appears this is by design, so there must be something I can do to avoid it. ...
2
by: Dick Swager | last post by:
I have a form with a progress bar and a label. The form launches a class that raises an event to indicate the progress. The event arguments contains integers to update the progress bar and a...
11
by: Jerry J | last post by:
How can I get an asp:Image to refresh when a user uploads a different jpg. I disabled caching using this command on Page_Load(): Response.Cache.SetCacheability(HttpCacheability.No Cache); but it...
7
by: John J. Hughes II | last post by:
I have a DataGridView with a TextBoxColumn. I setting the data source to a List<stringvalue in a static class. The list is filled from a background thread. So far all is fine and it works...
0
neo008
by: neo008 | last post by:
Hi All, I have built up an adodc connnection and using it through connection strings. I'm facing problem with update query- code looks like- adodc1.recordource="update products set...
20
by: Phil | last post by:
VB2008 I have a DataGridView with MultiSelect = True and SelectionMode=FullRowSelect. One of the columns is a checkbox column. I have a function that goes through all the selected rows and sets...
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: 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
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.