Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

updating form...

Posted on 2000-02-16
8
Medium Priority
?
136 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 200 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…
Suggested Courses

688 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