Solved

updating form...

Posted on 2000-02-16
8
134 Views
Last Modified: 2010-05-02
I made a application which deals with a gsm-modem. It receives and sends messages through that modem. I'm also showing all the time in my form how many messages are in a buffer not yet to send. There is also 20 spots in gms-modems memory where it can store the coming messages. My form also shows which places have messages and which don't have (red and green lights).

My problem is that when I'm receiving and sending messages, I try to update those informations in my form (red and green lights) but nothing happens in a form. It could sometimes be quite a long subroutine to send and receive those messages and during that subroutine there could be many changes in a lights. Those lights updates only until my subroutine ends.

So how can I update those lights during my subroutine??

Thanks in advance!
0
Comment
Question by:majala
[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
  • 4
  • 2
  • 2
8 Comments
 
LVL 1

Expert Comment

by:macu
ID: 2526560
Use FormName.Refresh And/Or ControlName.Refresh after each light change.
0
 
LVL 10

Accepted Solution

by:
caraf_g earned 100 total points
ID: 2526561
place the command DoEvents at strategic positions in your code.

Also worth trying: Refresh.
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2526563
Photo finish <g>
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 1

Expert Comment

by:jjsc
ID: 2526569
You may also want to try the odd DoEvents() at strategic places in the code. Be aware, though, that DoEvents() can bring its own problems in that your code may (potentially) stop while some other process takes the CPU.

John
0
 
LVL 1

Expert Comment

by:macu
ID: 2526576
Call it a draw.... :)
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2526646
jjsc right on our heels :o)

"stop while some other process takes the CPU"
I'd hope so! Window's supposed to be "multi-tasking"
0
 
LVL 1

Expert Comment

by:jjsc
ID: 2526673
True, but there are other (less painful) ways to give up the processor - for example, the Sleep API call can be very useful (especially under NT).

Also majala mentioned that one of the update routines could be quite long (with several changes). It may be that executing a DoEvents in the routine is perfectly acceptable (i.e. windows continues to work), but it may also mean that the processing of the function is affected, a side effect that may or may not be important.

And shucks, missed by 1 minute (or 2 maybe :-)

John
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2567964
majala,

Thanks for the points. Next time though, if you feel the answer is less than satisfactory, please ask me for more detail. I'd be happy to help you further in order to get a better grade.
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

734 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