473,508 Members | 2,206 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Line Segment ActiveX Control

Does anyone know of a downloadable Line ActiveX control which allows me to
plot straight lines on a VC++.NET form?
Thanks
Jack
Nov 17 '05 #1
7 1505
"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:

// Warning: code untested
using System.Drawing; // Remember dependency system.drawing.dll
using System.Windows.Forms; // Remember dependency system.windows.forms.dll

void DrawFormLine(Form form, Pen pen, Point start, Point end) {
Graphics g = form.CreateGraphics();
g.DrawLine(pen, start, end);
}

I hope this helps - please reply if I misunderstood you or this solution
causes any trouble.
--
Derrick Coetzee, Microsoft Speech Server developer
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included code samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Nov 17 '05 #2
Yes. Though, I need to draw the lines visually at design time Thanks
Jack

"Derrick Coetzee [MSFT]" <dc******@online.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D
:eq**************@TK2MSFTNGP14.phx.gbl...
"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:

// Warning: code untested
using System.Drawing; // Remember dependency system.drawing.dll
using System.Windows.Forms; // Remember dependency

system.windows.forms.dll
void DrawFormLine(Form form, Pen pen, Point start, Point end) {
Graphics g = form.CreateGraphics();
g.DrawLine(pen, start, end);
}

I hope this helps - please reply if I misunderstood you or this solution
causes any trouble.
--
Derrick Coetzee, Microsoft Speech Server developer
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included code samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Nov 17 '05 #3
> 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.
Nov 17 '05 #4
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.

Nov 17 '05 #5
tsda wrote:
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


Sorry for the slow response. I'm afraid I'm not familiar with this
company's technology and don't have access to it, but if you can describe
in more detail in what way you're stuck and what might help you make
progress, I might be able to help.
--
Derrick Coetzee, Microsoft Speech Server developer
This posting is provided "AS IS" with no warranties, and confers no rights.
Nov 17 '05 #6
Derrick:
All the company provides is in my email. Cool applett but no supporting code
or samples. Do you know of a vc++ form ready for graphics that I can drop in
code to handle a file that gets updated in real time without having to write
one?
Thanks, Mike
"Derrick Coetzee [MSFT]" wrote:
tsda wrote:
> 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


Sorry for the slow response. I'm afraid I'm not familiar with this
company's technology and don't have access to it, but if you can describe
in more detail in what way you're stuck and what might help you make
progress, I might be able to help.
--
Derrick Coetzee, Microsoft Speech Server developer
This posting is provided "AS IS" with no warranties, and confers no rights.

Nov 17 '05 #7
"Mike Barna" <Mi*******@discussions.microsoft.com> wrote:

"Derrick Coetzee [MSFT]" wrote:
tsda wrote:
> 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
Sorry for the slow response. I'm afraid I'm not familiar with this
company's technology and don't have access to it, but if you can

describe in more detail in what way you're stuck and what might help you make
progress, I might be able to help.


All the company provides is in my email. Cool applett but no supporting

code or samples. Do you know of a vc++ form ready for graphics that I can drop in code to handle a file that gets updated in real time without having to write one?


Sorry again for the slow response. I'm not sure exactly what you're trying
to do, but if you only want to draw things based on a file's contents at
runtime, you can use either the GDI methods on Graphics, such as DrawLine(),
or use a DirectX control. If you're trying to draw a chart based on some
data in the file and update it in real-time, you should be able to use just
about any chart control to do this, such as the MSChart control. I hope this
helps.
--
Derrick Coetzee
This posting is provided "AS IS" with no warranties, and confers no rights.
Nov 17 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
7555
by: Fie Fie Niles | last post by:
This one XP machine (with IE 6) is having a problem viewing any ActiveX controls (created on VB6) on the Internet Explorer browser. I put the same ActiveX control in a VB program, and when I run...
65
12509
by: Skybuck Flying | last post by:
Hi, I needed a method to determine if a point was on a line segment in 2D. So I googled for some help and so far I have evaluated two methods. The first method was only a formula, the second...
1
1747
by: Anand Kale | last post by:
How to have ActiveX control called from Web Form in ASP.Net ? ActiveX control is written using VC++/MFC/ATL-COM. Also kindly answer following issues, 1. Also how to take care of issues about...
3
2502
by: Jeffery Franzen | last post by:
Anyone know where the documentation is regarding Activex controls in asp web forms? I'm using VS.NET 2002 enterprise and am trying to use Activex controls in vb.net web form app. I do the add...
3
2286
by: Weston Fryatt | last post by:
Simple question I hope.... How do I send data to and from an ASP.Net (server side) web page to a ActiveX Control (client side) embedded in a web browser??? What I need to do, is I have image...
7
4379
by: Jarod_24 | last post by:
I just downloaded a activex control that was written in C# and tried to view it on my PDA's Internet Explorer. At my regular PC it displayed just fine, but nothing showed up on the pda. Do...
1
2218
by: Jayender | last post by:
Hi, I have an ActiveX control (to display the Images),I have added the reference of that in my web based applicaton .and added the ocx in my tool bar , but the viewer (activex component- ocx ) is...
6
3499
by: Budhi Saputra Prasetya | last post by:
Hi All, I'm trying to display .NET Custom Control (created using Inherited Control) on an ASPX page, but no luck. I already registered the Control to Global Assembly Cache through .NET Framework...
6
8026
by: hufaunder | last post by:
I have an ActiveX component that I want to use in a library that I am writing. As a first test I used the ActiveX component in a windows form application. Adding the component created: Ax.dll...
0
7123
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7326
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7498
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3182
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1557
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.