Measurement Computing CB-7000 Utilities User Manual

Page 40

Advertising
background image

36

Note: If using the Microsoft Visual C++ for development tools, be sure to use the parameters -Tc
or -TC with the VC compiler with C syntax. Use the parameters -Tp or -TP with the VC compiler
with C++ syntax.

Q: Why doesn’t ComboBox's CHANGE event work with VB?

A

:

In Delphi and Borland C++ Builder, the CHANGE e vent can work correctly when the user

chooses the items. But, In Visual Basic, this event only occurs when the user keys in something.
The user can write codes in event “CLICK” with Visual Basic to do the same work. This event
“CLICK” also works correctly in Delphi and Borland C++ Builder.

Q: Is TIMER event reentered?

A: If the user uses object “TIMER” in the project, the user must ensure the setting value of
Interval of “TIMER” is appropriate to the user’s program, system and hardware.

Suppose the “TIMER” triggers an event to do something, and then triggers another event again to
do the same work before the prior job does not done. This may cause the job to be reentered
concurrently. In time, it may crash the user’s system since when many jobs are reentered at the
same time, the system is overload.

To prevent the system crash with the object “TIMER”, the suggestion is to av oid the reentry of
the TIMER event as follows:

bool bProcessing ; // declare a flag
void __fastcall TForm1::FormCreate(TObject *Sender)
{ bProcessing = false; }
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{ if (bProcessing == true)
return ; // avoid reenter
else
bProcessing = true;
........................
........................
// if (something wrong ) {
//bProcessing = false; // enable next timer event to enter
//return;
//}
........................
........................
bProcessing = false; // enable next timer event to enter
}

Q: Error message "Unable to create process" occurs with Borland C++ Builder and Delphi. Why?

A: This error message occurs when some .DLL file can't be found in the user’s system. Please
make the executable file of this program and then run the execution file. The user may receive a
different error message as follows:

Advertising