?
Solved

NO TEXT IN TEXT BOX

Posted on 2004-03-28
6
Medium Priority
?
277 Views
Last Modified: 2013-11-13
I was wondering if any one know why when I turn on the text in a message box before
I go into a loop that processed data or does other things the text does not display.  The box will
display but when I put up a message like a count of were I am or some information of what is going on the box is blank.  If I pause in a debug mode the text will display and be there if I continue.
I suppose if I put a big delay in it might show up before I started processing but I am not sure why its not displaying  - Any one experienced this??

0
Comment
Question by:rswickersham
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 14

Accepted Solution

by:
Farzad Akbarnejad earned 500 total points
ID: 10701488
Hi,
If you are using Visual Basic use DoEvents statement in your loop.

-FA
0
 
LVL 9

Expert Comment

by:bhagyesht
ID: 10701552
FarzadA said it right. basically what happens is that VB is doing the processing the screen painting /refreshing being at lower priority is ignored. when you give doevents it gives the system some time to carry out events like painting the screen or refresshing. remember though each call reduces the speed of ur program.
Bhagyesh Trivedi
0
 
LVL 6

Expert Comment

by:mmusante
ID: 10701993
You can also call the refresh method of your textbox
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 15

Expert Comment

by:SRigney
ID: 10704011
Check that Option Explicit is on.

If you are setting the text into one variable and displaying another due to a mistyping of the variable name then it will display nothing.
0
 
LVL 2

Expert Comment

by:KhunJean
ID: 10706769
mmusante is right.

Use the refresh method.

By the way if you have a need for speed use a label instead of a textbox.
It is a little faster in repainting. And if you use it in a tight loop. refresh it just once in a while.

As a sidenote
DoEvents can be very dangerous. Use it with care.
With a doEvents your program flow can be different than you expect.
Try using it in a dataarrival event from a winsock and you'll see what i mean.
Another bad habit of doEvents when used often is it will push up your CPU usage in the taskmanager to a 100%. That can give a false impresion about the real cpu usage of your program.

When you need a little pause in your programm or give some cpu time to another process use Sleep()

And SRigney is SO right.
A lot of mistakes even typos can be detected while compiling. A make exe once in a while is a good practice if your program gets a bit bigger. Just running it from VS will not do a full compile.






0
 
LVL 15

Expert Comment

by:SRigney
ID: 10707320
You can do a start with full compile ctrl+f5 and it will verify everything is correct as it does with an actual compile.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses

650 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