Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display to user that processing is going on 1

Status
Not open for further replies.

xtreemnet

Programmer
Aug 9, 2003
88
NZ
Hi

I am reading a big text file and doing processing on the read information. I have a form where I browse to the file and then press a button "Process". On click method of this button I have form2.show. In the form2's load event I call a procedure called "ProcessDocument". The form2 has a border style fixed dialog and controlbox as false. It has also a label control which has caption property "Please wait processing is going on". However the form2 shows after the processsing has been done. I am not able to figure out why this is happening.
Can somebody let me know, how to achive this,

Thanks
 
at the very beggining of the form2 load event add:

Form2.Show
DoEvents

Hope that helps! let me know how it goes.
 
That was great. Its working. I had to place the "DoEvents" after each statement where I was displaying the message in the label. After the process has finished the form still stays there. How do I unload/hide it? I tried me.hide but did not work. The code goes like this:

Form1

Private Sub cmdProcess_click

form2.show

end sub


Form2

Private Sub Form_Load()
Form2.Show
DoEvents

Label1.Caption = "Processing XML file...."
DoEvents
Call LoadDoc
End Sub

Private Sub LoadDoc()
Label1.Caption = "Loading XML file...."
DoEvents
........
........

Label1.Caption = "Updating table...."
DoEvents
........
........

Label1.Caption = "Processing finished...."
DoEvents
Me.hide

End Sub

with this code the form2 still stays there with the last label caption displayed.

Thanks,
 
after the form2.show add the form2.hide (or unload form2 depending on what you are really trying to do). so the new form1 code would look something like this:

Private Sub cmdProcess_click

form2.show
form2.hide 'or: unload form2

end sub

oh, and you can take out the me.hide.
 
xtreemnet -

Please see faq222-2244 for information on marking posts that are helpful to you.

Thanks
 
bjd4jc

I did not understand your reply. Did I do anything wrong?
Please explain.

Thanks,
 
You have started 19 threads and only have given out one star...
 
Sometimes thank you is enough... with that said, IMO, Saying thank you alone is not the way that the site was designed to show that a paticular person has helped you out. It is not solely to get a star for the sake of a star but when ppl do keyword searches it displays the star and that denotes that the post helped someone else... thank you alone does not show up at a quick glance on a search.... and the only reason I brougt it up was to inform and not to beat over the head...
 
I have to agree with bjd4jc. On the one hand being a Star Monger is deplorable. But on the other, when I search for solutions to problems on this site, If I see a past post got 3 or 4 stars for being helpful I will go to that first because it probably has a solution!



Casper

There is room for all of gods creatures, "Right Beside the Mashed Potatoes".
 
After I replied with thanks, I had clicked the Star "Thank Kryzsoccer for this valuable post!"

 
Then you must confirm the giving of a star... an additional window pops up to do that...
 
If your browser does not have Java enabled then the Star link won't work.

Enable Java and the Confirm window comes up. When you click Confirm then the star is given.

I will edit faq222-2244 to clarify this

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'If we're supposed to work in Hex, why have we only got A fingers?'
 
bjd4c

on the other hand, there is nothing stopping you to give a star if you think a post was helpfull.

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
What a wonderfull world - Louis armstrong
 
Chrissie1-

I think you've missed the point of my post...
 
nope i didnt miss the point, you want the posters to give the stars but if you think that a fellow guru deserves a star an didnt get any from the poster you can give him that star and dont wait for that poster to do it. I think its even more satisfaying to get a star from a fellow guru the from a poster.

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
What a wonderfull world - Louis armstrong
 
I'll quote myself here

>>and the only reason I brougt it up was to inform...

The post was not helpful for me personally, however it was for extreemnet... so, if the post was not helpful to me I should not give the star... I do agree that if I do find a post that was helpful to me that I didn't start, I should still give a star, hopefully along with the original poster and others who found it helpful...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top