ActiveX

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Adrian

    ActiveX

    Hi
    What would the equivalent to an ActiveX be in VB.Net?

    I need an application that will run as a trusted site and be imbedded in a
    browser but have access to a locally installed programs Com objects. It also
    need to be complied so I can't use VB or JS script.

    Also is there an upgrade for code written in VB6 for a an OCX / ActiveX to
    what ever has superseded it or is it start again time!

    Thanks


  • pmclinn

    #2
    Re: ActiveX

    Writing an ActiveX Control in VB.NET

    This will give you the basics.

    Comment

    • Adrian

      #3
      Re: ActiveX

      Thanks, I will give it a go...

      "pmclinn" <peter@mclinn.c om> wrote in message
      news:1105678670 .647531.51900@c 13g2000cwb.goog legroups.com...[color=blue]
      > Writing an ActiveX Control in VB.NET
      > http://www.vbdotnetheaven.com/Code/Jun2003/2067.asp
      > This will give you the basics.
      >[/color]


      Comment

      • Herfried K. Wagner [MVP]

        #4
        Re: ActiveX

        "Adrian" <Adrian@nospamh otmail.com.uk> schrieb:[color=blue]
        > What would the equivalent to an ActiveX be in VB.Net?
        >
        > I need an application that will run as a trusted site and be imbedded in a
        > browser but have access to a locally installed programs Com objects. It
        > also need to be complied so I can't use VB or JS script.[/color]

        In General, you cannot create ActiveX *controls* with .NET.

        J# Browser Controls provide developers with a way to migrate their existing
        Java applet source code to run within the context of the .NET Framework

        <URL:http://www.microsoft.c om/downloads/details.aspx?Fa milyID=325a8f15-fe7b-4087-aa46-6d3e1b6108e0>

        MSDN documentation link:

        <URL:http://msdn.microsoft. com/library/en-us/dv_vstechart/html/vjtskMigratingJ avaAppletsToMic rosoftJBrowserC ontrols.asp>

        For .NET 1.0, controls as ActiveX are only supported hosted in MS IE 5+6:

        <URL:http://support.microso ft.com/?scid=kb;EN-US;311334>
        <URL:http://support.microso ft.com/?scid=kb;EN-US;317346>

        Using Windows Forms Controls in Internet Explorer:

        <URL:http://msdn.microsoft. com/msdnmag/issues/02/06/rich/rich.asp>

        --
        M S Herfried K. Wagner
        M V P <URL:http://dotnet.mvps.org/>
        V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


        Comment

        • Adrian

          #5
          Re: ActiveX

          Hi

          I can't get the VB.Net example to look like or work the one at


          I cannot get the Inherits System.Windows. Forms.UserContr ol, AxMycontrol line
          to enter with out an error! What have I done wrong?

          Thanks (and yes I'm new to .Net!)

          Below is what it looks like when I enter the code from the above link!



          Namespace ActiveXDotNet

          Public Interface AxMyControl

          Property UserText() As String

          End Interface

          End Namespace

          Public Class myControl

          Inherits System.Windows. Forms.UserContr ol

          Private mStr_UserText As String

          Public Property UserText() As String

          Get

          Return mStr_UserText

          End Get

          Set(ByVal Value As String)

          mStr_UserText = Value

          txtUserText.Tex t = Value

          End Set

          End Property

          End Class


          "Adrian" <Adrian@nospamh otmail.com.uk> wrote in message
          news:cs89a8$f7j $1@hercules.bti nternet.com...[color=blue]
          > Thanks, I will give it a go...
          >
          > "pmclinn" <peter@mclinn.c om> wrote in message
          > news:1105678670 .647531.51900@c 13g2000cwb.goog legroups.com...[color=green]
          >> Writing an ActiveX Control in VB.NET
          >> http://www.vbdotnetheaven.com/Code/Jun2003/2067.asp
          >> This will give you the basics.
          >>[/color]
          >
          >[/color]


          Comment

          • Adrian

            #6
            Re: ActiveX

            OK, it worked without the Inherits System.Windows. Forms.UserContr ol,AX...
            Thanks

            "Adrian" <Adrian@nospamh otmail.com.uk> wrote in message
            news:cs8ncq$cco $1@titan.btinte rnet.com...[color=blue]
            > Hi
            >
            > I can't get the VB.Net example to look like or work the one at
            > http://www.vbdotnetheaven.com/Code/Jun2003/2067.asp
            >
            > I cannot get the Inherits System.Windows. Forms.UserContr ol, AxMycontrol
            > line to enter with out an error! What have I done wrong?
            >
            > Thanks (and yes I'm new to .Net!)
            >
            > Below is what it looks like when I enter the code from the above link!
            >
            >
            >
            > Namespace ActiveXDotNet
            >
            > Public Interface AxMyControl
            >
            > Property UserText() As String
            >
            > End Interface
            >
            > End Namespace
            >
            > Public Class myControl
            >
            > Inherits System.Windows. Forms.UserContr ol
            >
            > Private mStr_UserText As String
            >
            > Public Property UserText() As String
            >
            > Get
            >
            > Return mStr_UserText
            >
            > End Get
            >
            > Set(ByVal Value As String)
            >
            > mStr_UserText = Value
            >
            > txtUserText.Tex t = Value
            >
            > End Set
            >
            > End Property
            >
            > End Class
            >
            >
            > "Adrian" <Adrian@nospamh otmail.com.uk> wrote in message
            > news:cs89a8$f7j $1@hercules.bti nternet.com...[color=green]
            >> Thanks, I will give it a go...
            >>
            >> "pmclinn" <peter@mclinn.c om> wrote in message
            >> news:1105678670 .647531.51900@c 13g2000cwb.goog legroups.com...[color=darkred]
            >>> Writing an ActiveX Control in VB.NET
            >>> http://www.vbdotnetheaven.com/Code/Jun2003/2067.asp
            >>> This will give you the basics.
            >>>[/color]
            >>
            >>[/color]
            >
            >[/color]


            Comment

            Working...