UltimaSerial Properties and Methods of UltimaWaterfall
 

 

Please use the included VB6 and VB2008 sample as reference. 

For Visual Basic 2008 examples, check out the following

Note: When using superkey, Bonus features should be modified in program instead of the immediate property panel of the control. For example

UltimaWaterfall.Key = "T1c2f345"    
UltimaWaterfall.ScalingMethod= uwBGR

32 or 64-bit?

All UltimaSerial ActiveXs are 32-bit components, you must select 32-bit code option when using 64-bit compilers. Both 32-bit and 64-bit Windows runs 32-bit applications properly. 

Properties: ChartDirection, ChartType, ColorDepth, ColodrScale, ScalingMethod, Data, Key

Methods: Chart, Copy2Clipboard, ChartNow

Event: CrossHair 

List of properties, methods and event:

ChartDirection: Direction of the waterfall flow

uwR2L: From right to left (Not available for 3D chart)
uwSlope: 45 degree from lower left corner to upper right
uwB2T: From bottom to top
uwT2B: From top to bottom 
uwNSlope: -45 degree from upper left corner to lower right

ColorScale (index) = OLE_COLOR : Customize the color scale. 

The maximum color scale has 512 members, but only members from index 0 to ColorDepth -1 are used in the chart.  

UltimaWaterfall.ColorScale(0)=&HFF0000

ChartType: Waterfall style

uw3D: 3D waterfall 
uw2D: 2D waterfall

ColorDepth: Translated color depth for data (default 64.). 

For 2D waterfall chart, the color of a data is ColorScale(data * ColorDepth /32768), where a negative number is treated as zero

For 3D waterfall chart, the height of a data is data*ColorDepth/32768, where a negative number is treated as zero

ScalingMethod: Color scaling method.  

Scaling Data =0 Data=32767
uwRGB (default) Red Blue
uwBGR Blue Red
uwBW Black White
uwWB White Black
uwB White Blue
uwG White Green
uwR White Red

Data (index): Instead of using Chart an array-type variant, you can use the combination of Data and ChartNow. Use Data to enter single data point at a time, when all data points are entered, use ChartNow to paint a new frame. This approach allows up 1024 points in the array

Chart (variant): the variant has to be one-dimensional 16-bit short integer array. Only the positive number will be charted.

Here is a simple VC++ sample to set up a 16-bit short integer array PowerSpectrum:

VARIANT PowerSpectrum;
VariantInit(&PowerSpectrum);

SAFEARRAY * psa;
SAFEARRAYBOUND rgsabound[2];

rgsabound[0].lLbound=0;
rgsabound[0].cElements=256;

psa=SafeArrayCreate(VT_I2,1,rgsabound);
short * pshort=(short *)psa->pvData;

PowerSpectrum.vt=VT_I2+VT_ARRAY;
PowerSpectrum.parray=psa;

//fill the array of pshort[];

m_ultimawaterfall.Chart(PowerSpectrum);

Copy2Clipboard: Copy the current image to the clipboard.  

ChartNow: Use the data entered via Data (n) to paint a  new frame This approach allows up 1024 points in the array

Key: UltimaWaterfall displays an ad-line at the upper left corner of the screen unless it is registered. Once you register UltimaWaterfall, enter the superkey via this property before invoking Chart method.

UltimaWaterfall .Key = "T1c2f345"     'The key to enable UltimaWaterfall, assuming T1c2f345 is your superkey

CrossHair (x, y) : reports the coordination of the mouse button movement

.NET users:

How to remove the warning of  "A reference was created to embedded interop assembly 'stdole' because of an indirect reference to that assembly from assembly 'Interop.ULTIMAWATERFALLTLib'. Consider changing the 'Embed Interop Types' property on either assembly"?

Last update: 02/28/22

Copyright: 2011  www.UltimaSerial.com