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