1

i have a very strange issue here. I have an .ocx based on an ActiveForm. This ActiveForm contains the TStyleManager and makes use of it in just this way:

TStyleManager.SetStyle(TStyleManager.LoadFromFile(Global_DM.SkinningFilename));

The style is applied perfectly and works fine.

Now the problem: My ocx is embedded in another application. This one is a .NET Windows Forms application, written in C# with Visual Studio 2008. Unfortunately, i do not know the source code of this application. Whenever my ocx is "instantiated", above line is being executed (just once) and after this, all the popup-menues in the hosting application are screwed up. Which looks like this: OK, sorry. Wanted to post a screenshot here but do not have enough reputation points. The popup-menues still have the correct layout, means, the correct number of entries and so on. But each item in the popup has just two to three weired characters. As if you try to display special characters using the wrong character set.

I have to stress this again: It's about popup-menus which are inside the hosting application and not on my ActiveForm. Everything inside my own ocx still works fine. If i disable my call to TStyleManager, the hosting application works fine as well. So it's definitely the TStyleManager which screws up the popup menues in the hosting application. This is so weired.

How can this ActiveForm and TStyleManager influence the appearance of controls outside of my ocx?

Thanks for any hints.

Harry

FHarry
  • 11
  • 1
  • Hi David, thanks a lot. I did really search for duplicates but did not find one. Anyhow, the answer in your link is perfect and solves my problem. Even if the "host" application is completely different, no Delphi etc., process is process and as such, it makes no difference. – FHarry Oct 09 '14 at 05:53
  • It's often hard to find dupes. In this case I remember having answered that question recently. That's how I found it. – David Heffernan Oct 09 '14 at 07:33

0 Answers0