Re: Line Segment ActiveX Control

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Derrick Coetzee [MSFT] (dcoetzee_at_online.microsoft.com)
Date: 03/15/05

  • Next message: Felix I. Wyss: "VC++2003: Methods implemented outside class body are never inlined for templates that are instantiated with __declspec(dllimport)"
    Date: Tue, 15 Mar 2005 12:51:52 -0800
    
    

    > 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/default.asp?url=/library/en-us/vbcon/html/vxconchangestolinecontrolinvisualbasicnet.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.
    

  • Next message: Felix I. Wyss: "VC++2003: Methods implemented outside class body are never inlined for templates that are instantiated with __declspec(dllimport)"
  • Quantcast