Solved

Creating Status/Progress window

Posted on 2008-10-05
8
188 Views
Last Modified: 2011-10-19
Hi,

My code consists out of different kind of functions. I would like to keep the user informed which function is running at that moment.
What I did it setup a text field and update this text field which every progress. Like
text1.text="function 1 running"
text1.text="function 2 running"
etc

However this text window is not updated instantly. It has a huge delay. Does somebody know a solution?

Regards,
Dennis
0
Comment
Question by:Schuttend
  • 4
  • 3
8 Comments
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 22644815
after having set the .text property, call "DoEvents" to let VB repaint the screen.
0
 

Author Comment

by:Schuttend
ID: 22644841
But how I call this from within vb6?

Call Doevents

does not work

Regards,
Dennis
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 22644861
text1.text="function 1 running"
DoEvents
0
 

Author Comment

by:Schuttend
ID: 22644899
I last question on this subject..

How can I update the textfile without losing previous information?

first message:
function 1 running

second one:
function1 running
function 1 finished

Text1.text=Text1.text & "new message"
does work a bit but the new message needs to be placed on the next line..

Regards,
Dennis
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 69

Expert Comment

by:Éric Moreau
ID: 22645001
insert CR/LF character:

Text1.text=Text1.text & vbcrlf & "new message"
0
 

Author Comment

by:Schuttend
ID: 22645027
Hi,

This does not work. Please attached pic...

Regards,
Dennis
status.jpg
0
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 50 total points
ID: 22645088
I haven't code in VB6 in awhile...but I'm pretty sure you need to set the MultiLine() Property of your TextBox to True.

0
 

Author Closing Comment

by:Schuttend
ID: 31503179
Hi..Sometimes the solution is that simple. Thanks!

Regards,
Dennis
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now