Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Active X Control In C# Web App

Active X Control In C# Web App

Scheduled Pinned Locked Moved C#
csharpcomhelpquestion
10 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Adrian Metcalfe
    wrote on last edited by
    #1

    Dont' know if this is the right forum but here goes ! I have an ActiveX control which I wrote (in VC6) and I am trying to use it in a C# Web App. I have run it through AxImp.exe and now got a couple of dlls and a cs file. Does any body know how I can now add the control to my C# page ? Hope some body can help. Cheers, Users. Can't live with 'em, can't kill em!

    J 1 Reply Last reply
    0
    • A Adrian Metcalfe

      Dont' know if this is the right forum but here goes ! I have an ActiveX control which I wrote (in VC6) and I am trying to use it in a C# Web App. I have run it through AxImp.exe and now got a couple of dlls and a cs file. Does any body know how I can now add the control to my C# page ? Hope some body can help. Cheers, Users. Can't live with 'em, can't kill em!

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #2

      Are you using Visual Studio? If so, just add the ActiveX dll to the Visual Studio toolbox, then drop it on your form as if it were a standard .NET control, VS will do the AxImp for you.

      Tech, life, family, faith: Give me a visit. I'm currently blogging about: Cops & Robbers Judah Himango

      A 1 Reply Last reply
      0
      • J Judah Gabriel Himango

        Are you using Visual Studio? If so, just add the ActiveX dll to the Visual Studio toolbox, then drop it on your form as if it were a standard .NET control, VS will do the AxImp for you.

        Tech, life, family, faith: Give me a visit. I'm currently blogging about: Cops & Robbers Judah Himango

        A Offline
        A Offline
        Adrian Metcalfe
        wrote on last edited by
        #3

        I am using VS 2003, when I add the ActiveX Control and build the project, it does not create anything and I can't access the control as it does not have a variable associated with it, any ideas ? Cheers Users. Can't live with 'em, can't kill em!

        J 1 Reply Last reply
        0
        • A Adrian Metcalfe

          I am using VS 2003, when I add the ActiveX Control and build the project, it does not create anything and I can't access the control as it does not have a variable associated with it, any ideas ? Cheers Users. Can't live with 'em, can't kill em!

          J Offline
          J Offline
          Judah Gabriel Himango
          wrote on last edited by
          #4

          Are you adding it to the VS toolbox and drop it on your form? Or did you just add it to the project references?

          Tech, life, family, faith: Give me a visit. I'm currently blogging about: Cops & Robbers Judah Himango

          A 1 Reply Last reply
          0
          • J Judah Gabriel Himango

            Are you adding it to the VS toolbox and drop it on your form? Or did you just add it to the project references?

            Tech, life, family, faith: Give me a visit. I'm currently blogging about: Cops & Robbers Judah Himango

            A Offline
            A Offline
            Adrian Metcalfe
            wrote on last edited by
            #5

            Hi, I added the activeX to the Toolbox and then dragged it onto the form but when I look as it's properties, it only shows the HTML properties, I can't see a way to give a variable which I can access from functions in the cs file. Any ideas ? Cheers Users. Can't live with 'em, can't kill em!

            J 1 Reply Last reply
            0
            • A Adrian Metcalfe

              Hi, I added the activeX to the Toolbox and then dragged it onto the form but when I look as it's properties, it only shows the HTML properties, I can't see a way to give a variable which I can access from functions in the cs file. Any ideas ? Cheers Users. Can't live with 'em, can't kill em!

              J Offline
              J Offline
              Judah Gabriel Himango
              wrote on last edited by
              #6

              If you dropped it on the form, it created a variable for you. VS usually assigns the name ax[componentName][number], so if you dropped the WebBrowser control, it would generate a variable named axWebBrowser1.

              Tech, life, family, faith: Give me a visit. I'm currently blogging about: Cops & Robbers Judah Himango

              A 1 Reply Last reply
              0
              • J Judah Gabriel Himango

                If you dropped it on the form, it created a variable for you. VS usually assigns the name ax[componentName][number], so if you dropped the WebBrowser control, it would generate a variable named axWebBrowser1.

                Tech, life, family, faith: Give me a visit. I'm currently blogging about: Cops & Robbers Judah Himango

                A Offline
                A Offline
                Adrian Metcalfe
                wrote on last edited by
                #7

                I tried adding the WebBrowser to the form, and nothing was created. It does as you say if you drop the control onto a windows form but not a web form, any ideas ? Users. Can't live with 'em, can't kill em!

                J 1 Reply Last reply
                0
                • A Adrian Metcalfe

                  I tried adding the WebBrowser to the form, and nothing was created. It does as you say if you drop the control onto a windows form but not a web form, any ideas ? Users. Can't live with 'em, can't kill em!

                  J Offline
                  J Offline
                  Judah Gabriel Himango
                  wrote on last edited by
                  #8

                  Lol...yeah, the WebBrowser controls is a Windows forms control, not a web forms control. That is where you're going wrong.

                  Tech, life, family, faith: Give me a visit. I'm currently blogging about: Cops & Robbers Judah Himango

                  A 1 Reply Last reply
                  0
                  • J Judah Gabriel Himango

                    Lol...yeah, the WebBrowser controls is a Windows forms control, not a web forms control. That is where you're going wrong.

                    Tech, life, family, faith: Give me a visit. I'm currently blogging about: Cops & Robbers Judah Himango

                    A Offline
                    A Offline
                    Adrian Metcalfe
                    wrote on last edited by
                    #9

                    I think we are talking via crossed wires. My original problem is that when I add any ActiveX control to a Web form, I dont know how to access it from the c# code as it does not create a variable. I used the web control as an example to prove to myself that if you add a control to a windows form, a variable is created. I do not intend to use a web control on a web form, that would be silly I agree. Is it possible to do what I want or can I only add special web form controls to web forms ? Hope you can help, Cheers Users. Can't live with 'em, can't kill em!

                    J 1 Reply Last reply
                    0
                    • A Adrian Metcalfe

                      I think we are talking via crossed wires. My original problem is that when I add any ActiveX control to a Web form, I dont know how to access it from the c# code as it does not create a variable. I used the web control as an example to prove to myself that if you add a control to a windows form, a variable is created. I do not intend to use a web control on a web form, that would be silly I agree. Is it possible to do what I want or can I only add special web form controls to web forms ? Hope you can help, Cheers Users. Can't live with 'em, can't kill em!

                      J Offline
                      J Offline
                      Judah Gabriel Himango
                      wrote on last edited by
                      #10

                      I don't think you can add an ActiveX control to a web form. My understanding is there is something extra that needs to be done. I don't know though, you should ask that question in the ASP.NET forums.

                      Tech, life, family, faith: Give me a visit. I'm currently blogging about: Cops & Robbers Judah Himango

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups