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. ActiveX Control & Interop

ActiveX Control & Interop

Scheduled Pinned Locked Moved C#
comcsharpquestionworkspace
6 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
    AJ123
    wrote on last edited by
    #1

    Hi I have an ActiveX control which behaves well outside of the .NET environment. However when i used it via interop i can't seem to set the backcolor and forecolor properties. Anyone any ideas? Cheers

    J 1 Reply Last reply
    0
    • A AJ123

      Hi I have an ActiveX control which behaves well outside of the .NET environment. However when i used it via interop i can't seem to set the backcolor and forecolor properties. Anyone any ideas? Cheers

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

      AX controls don't always respond to .NET standards, such as having Fore and Back colors. This is probably settable only if the Ax control provides some means of of setting those explicitly outside the normal properties.

      Tech, life, family, faith: Give me a visit. I'm currently blogging about: Virginia Tech Shootings, Guns, and Politics The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

      A 1 Reply Last reply
      0
      • J Judah Gabriel Himango

        AX controls don't always respond to .NET standards, such as having Fore and Back colors. This is probably settable only if the Ax control provides some means of of setting those explicitly outside the normal properties.

        Tech, life, family, faith: Give me a visit. I'm currently blogging about: Virginia Tech Shootings, Guns, and Politics The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

        A Offline
        A Offline
        AJ123
        wrote on last edited by
        #3

        Yeah, its quite strange the ActiveX Control supports BackColor and ForeColor. When they come through COM Interop - the AxInterop file exposes them as .NET Color type. The standard interop files gives an interface with them as UINT. Neither of which work! Very frustrating considering the control works fine ouside of .NET.

        J 1 Reply Last reply
        0
        • A AJ123

          Yeah, its quite strange the ActiveX Control supports BackColor and ForeColor. When they come through COM Interop - the AxInterop file exposes them as .NET Color type. The standard interop files gives an interface with them as UINT. Neither of which work! Very frustrating considering the control works fine ouside of .NET.

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

          I'm sure there's a way to get this to work. What is the method/property that COM really exposes to set the back color? (e.g. not the one .NET is showing you)

          Tech, life, family, faith: Give me a visit. I'm currently blogging about: Virginia Tech Shootings, Guns, and Politics The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

          A 1 Reply Last reply
          0
          • J Judah Gabriel Himango

            I'm sure there's a way to get this to work. What is the method/property that COM really exposes to set the back color? (e.g. not the one .NET is showing you)

            Tech, life, family, faith: Give me a visit. I'm currently blogging about: Virginia Tech Shootings, Guns, and Politics The apostle Paul, modernly speaking: Epistles of Paul Judah Himango

            A Offline
            A Offline
            AJ123
            wrote on last edited by
            #5

            I agree... It looks like interop is not calling through to the old property on the control. But i am at a loss... Managed to cast it back to the original interface that exposed the backcolor as uint. Bu that didn't help.

            J 1 Reply Last reply
            0
            • A AJ123

              I agree... It looks like interop is not calling through to the old property on the control. But i am at a loss... Managed to cast it back to the original interface that exposed the backcolor as uint. Bu that didn't help.

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

              AJ123 wrote:

              Managed to cast it back to the original interface that exposed the backcolor as uint.

              So setting the uint didn't work?

              Tech, life, family, faith: Give me a visit. I'm currently blogging about: Virginia Tech Shootings, Guns, and Politics The apostle Paul, modernly speaking: Epistles of Paul 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