473,779 Members | 2,083 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 1521
"Jacky Luk" <jl@knight.co m> 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::Create Graphics() and
Graphics::DrawL ine() 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(Fo rm form, Pen pen, Point start, Point end) {
Graphics g = form.CreateGrap hics();
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******@onlin e.microsoft.com > ¼¶¼g©ó¶l¥ó·s»D
:eq************ **@TK2MSFTNGP14 .phx.gbl...
"Jacky Luk" <jl@knight.co m> 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::Create Graphics() and
Graphics::DrawL ine() 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(Fo rm form, Pen pen, Point start, Point end) {
Graphics g = form.CreateGrap hics();
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.co m> 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::Create Graphics() and
Graphics::DrawL ine() 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.ChartCon trol 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.dl l file). The Chart Plotter 2004 control can
then be accessed by referencing the Ironic.ChartCon trol namespace.

Alternatively, to add the Control to your Toolbox (recommended), simply
select Tools | Add/Remove Toolbox items.., and browse to the ChartControl.dl l
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
PlotLineCollect ion 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
-

plotMultipleVal ues
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 PlotLineCollect ion
property)
Various (7 Overloads)

_______________ _______________ _______________ _______________ _______________ _
"Derrick Coetzee [MSFT]" wrote:
Derrick Coetzee [MSFT] wrote:
"Jacky Luk" <jl@knight.co m> 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::Create Graphics() and
Graphics::DrawL ine() 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.ChartCon trol 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.ChartCon trol 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*******@disc ussions.microso ft.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.ChartCon trol 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
7577
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 the VB program on that same machine, I can view the ActiveX control fine. He is using Citrix. The same ActiveX controls can be viewed on other machines. When trying to view 1 of the ActiveX control, he got an error "Visual Basic Run-time redist...
65
12615
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 method was a piece of C code which turned out to be incorrect and incomplete but by modifieing it would still be usuable. The first method was this piece of text:
1
1768
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 security etc ? 2. Can anyone give me exact steps to embedd activex in a web form ? 3. Can the activeX control interact with the server side control on the web form ? 4. Do I need to register the activeX on client machine ? I want to download the...
3
2521
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 control to pallete and then add a reference. I get the interop dll added to bin folder. I did this with the MediaPlayer activex control as a simple case to to try and get it working. I set the control to autostart via the html parameter tag for...
3
2307
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 data (mostly TIFF format) that need to be sent to our custom Image Viewer (ActiveX control). So far I can get the TIFF image data loaded into a Byte Array in C# on my ASP.Net web page, But how do I send this data now to my ActiveX control on the...
7
4398
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 ActiveX controls that are to be used by a pda need to be written in the ..net compact framework, or am i missing something else here? i have a HP iPaq 2490 with Windows Mobile Premium installed While i'm at it; does a activex control allow you to...
1
2234
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 disabled , but i tried this in Window based application, and it works great , but i need to do it in Web based applicaion , is there anything i need to add for making that to enable so that i can drag and place it in my web form ? waiting for...
6
3521
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 1.1 Configuration. I have also put a reference to the control on my ASP .NET project. The view that I get is only a disabled text area. Below is the code that I'm using:
6
8079
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 .dll I can not call the functions in the ActiveX component. In the next step I tried to use the ActiveX component in a class library. I simply added a reference to the corresponding COM component. This this only
0
9474
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10306
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10075
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8961
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7485
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5504
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4037
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 we have to send another system
3
2869
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.