July 20, 2001

Returning Multiple Values From A Method

Suppose you have some C++ code that you’d like to convert to the Java programming language. While doing the conversion, you come across the following code: void getStats(int data[], int& count, int& sum, int& mean) { count = 0; sum = 0; mean = 0; for (int i = 0;

Prevent Timer Re-Entry

When using a timer control, it is important to prevent re-entry.This occurs when the processing in the _Timer event takes long enough to still be executing when the next _Timer event fires. It is even possible for the execution of the second timer event to pass up that of the

Passing Objects ByVal in VB

You can pass Object parameters to a sub ByVal just as you pass other parameters. But what is the difference between passing Objects ByVal and ByRef, since an object variable always contains a reference to the object in memory and not the object itself?An object parameter passed ByVal behaves in

Declaring Destructors Virtual

Writing basic classes needs no more definition from the programmer than just declaring a few member functions and variables. But, what if you needed to design a class that was derived from other classes and you wanted to invoke polymorphism with the class instantiation? You would always need to declare

Remove a Character From a String

Use the following code: Public Function RemoveChar(ByVal str As String, ByVal strChar As String) As String ‘ Function: RemoveChar ‘ ‘ Desc: Extracting requested character from given string. Return value is changed string ‘ ‘ Parm: str – string that has to be changed ‘ strChar – character that supose

Another Way To Debug ActiveX EXE Components

An easy way to debug ActiveX EXE Components is to run ActiveX EXE project in the IDE VB environment and then run your client application or client project. But before do that, you have to make sure that your ActiveX EXE project is binary compatible with the respective component exe

No more posts to show