How do I make my GUI more responsive?

CidTek

Active Member
Licensed User
Longtime User
Just before doing a SQL lookup I show a ProgressDialog (even tried a ToastMessage) and neither pop until the SQL select and listview populating are finished. So I get long pause of nothing then quick flash of my dialog and the populated listview shows. I even tried a Doevents before executing the query.
 

CidTek

Active Member
Licensed User
Longtime User
25 seconds is very very slow.
Can you post your query?
Maybe you can add an index to one of the columns.

It's a 11 meg db with 5 tables and the query has several joins. The result set is used to do another select while looping through the first cursor so I'm not surprised at all by the speed. The tables are indexed.

But the question is why does my ProgressDialog which is popped before the search not show until after it's done.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
I have a similar issue, with progressbarsow....
I call it in activity main, so that the user knows that something is beeig done, and then inthe trget activity, I call progressbarhide as the last line of Activity create...the progressbar gets hidden before the layout is loaded!
is there anyway to catch, displayready alike event?
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
But the question is why does my ProgressDialog which is popped before the search not show until after it's done.
To show the ProgressDialog the app has to get back to run the message loop. The only way to do this in linear code is to call DoEvents after showing the dialog and at intervals within your long loop to let it update.
 
Upvote 0

CidTek

Active Member
Licensed User
Longtime User
I have a similar issue, with progressbarsow....
I call it in activity main, so that the user knows that something is beeig done, and then inthe trget activity, I call progressbarhide as the last line of Activity create...the progressbar gets hidden before the layout is loaded!
is there anyway to catch, displayready alike event?

Even though this may be a similar issue, the problem with thread hijacking is any answer to your issue may lead readers to think my issue is resolved if they only come back to the last unread answer. if you wish to continue discussing your progressbar problem could you please start a new thread?
 
Upvote 0
Top