473,888 Members | 1,448 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 1526
"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
7583
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
12654
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
1772
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
2527
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
2313
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
4405
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
2239
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
3533
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
8087
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
9961
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9800
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
10778
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9597
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
7990
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
7148
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5824
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
6014
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4642
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

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.