Derrik:
Ironic Process (low cost) (and graphics server.com-high cost)) have nice
Graphics server engines that can be added to a form in vc++.net via this
added toolbox plugin, and nicely complements the existing toolbox in
vc++.NET. I can't get them hooked up to read file data and update in real
time as a file changes. It's easy to load the server to a form but I'm stuck
on these real simple looking Ironic.ChartControl namespace method calls
below. Can you help/recommend? Info below. Thanks, Mike
http://www.ironic-processes.com
Chart Plotter 2004 is provided as a single Dynamic Link Library (DLL) file.
This DLL file is a fully configured Control for .Net environments, and can be
rapidly deployed to .Net IDEs (Integrated Development Environments) and
configured using the Property Browser. (NB alternatively, all of the
Properties defined in the Property Overview page are ‘Public’ and can be
configured in code.)
To add the DLL to your project, either add a Reference to the Solution
(Right Click on ‘References’, select ‘Add Reference..’ and browse to the
location of the ChartControl.dll file). The Chart Plotter 2004 control can
then be accessed by referencing the Ironic.ChartControl namespace.
Alternatively, to add the Control to your Toolbox (recommended), simply
select Tools | Add/Remove Toolbox items.., and browse to the ChartControl.dll
file. This will automatically add Chart Plotter 2004 to your Toolbox so that
it can be ‘Drawn’ live onto Forms.
Then simply add a couple of method calls to your code to plot the values,
and reset the data when you are finished.
METHOD CALLS:
Chart Plotter 2004 Public Methods
Plotting data on the Chart Plotter 2004 is extremely simple, requiring the
minimum amount of coding. All appearance and behavioural properties are
available within the Property Browser window, enabling Chart Plotter 2004 to
be rapidly ‘Dropped’ into an application, and fully adhering to the standard
of visual design, development and Rapid Application development.
After having ‘Drawn’ Chart Plotter 2004 onto your application Form, and used
the Property Browser to set the appearance and behavioural properties, it is
necessary to add the code to actually ‘Plot’ a value onto the display.
The default Chart Plotter has one single Plot Line defined, however it is
necessary to add more Plot Lines if more than one data plot is desired. (See
PlotLineCollection in the Property Overview)
The required methods are:
Method Name
Description
Argument/s
Return Type
plotValue
Plots a value on the specified line
int LineNumber, float valueToPlot
-
plotMultipleValues
Plot an array of values – similar to plotValue except this method is
optimised to take an array of line numbers and an equal length array of
values and plot them all in one method. This method should be used to
optimise performance when more than one plot line is used.
int lines __gc [], float values __gc []
resetAll
Resets all data (removes any current plots)
-
-
TimeIncrement
Increment the time value on the X-Axis (Manually. This method is not
necessary if the IncrementTime property is set to ‘OnPlotLine1’ and plotValue
is called periodically for Plot Line 1)
-
-
setPlotLine
Manual code way to set Plot Lines (not necessary if pre-defined design time
Plot Lines are configured in the Property Browser (see the PlotLineCollection
property)
Various (7 Overloads)
__________________________________________________ __________________________
"Derrick Coetzee [MSFT]" wrote:
Derrick Coetzee [MSFT] wrote: "Jacky Luk" <jl@knight.com> wrote:
> Does anyone know of a downloadable Line ActiveX control which allows me > to plot straight lines on a VC++.NET form?
I'm not sure exactly what you have in mind, but you should be able to draw simple straight lines on a form using Control::CreateGraphics() and
Graphics::DrawLine() as follows: [ snip ]
Yes. Though, I need to draw the lines visually at design time
If it's only horizontal and vertical lines you're interested in, you might
check out this article:
http://msdn.microsoft.com/library/de...albasicnet.asp
Although it references VB.NET, the controls are the same in every .NET
language and the same trick should work:
"During upgrade, vertical or horizontal Line controls are replaced with the
Windows Forms Label control, with the Text property set to an empty string,
the BorderStyle property set to none, and the BackColor, Width, and Height
properties set to match the original control."
If you're looking instead to draw lines of arbitrary slope, unfortunately I
haven't found anything to do this, but if you're interested I could whip
something up.
--
Derrick Coetzee, Microsoft Speech Server developer
This posting is provided "AS IS" with no warranties, and confers no
rights.