activex control in C#

I am using an activex control with C# (compiled with VB6).....works a little too well.

The control itself uses another activex control as well as a .dll.

In the VB IDE all is well....

With C#...a method in the control will always fire twice!

The control itself saves text to a file. If it saves "a"...it will be "aa".

weird.


Answer this question

activex control in C#

  • Eric Law

    I rewrote the the .ocx with a SaveBuffer sub that handles the call instead of using a similar method from the imbedded ocx in c#.

    Another words....just adding a sub in VB6...and calling it from c#, seems just the act of calling it...cured the problem in c#.

    vb6 < my ocx used another ocx. I was using the embedded ocx for a method in c# (problems)

    so with my vb ocx I just wrote a sub to call the embedded ocx.. 

    confusing enough



  • stanleyqian

    Sorry about that muddied explanation. Yes that "hack" did solve the problem.

    If I use the compiled ocx (the one "embedded" in my ocx) directly in c# it displays the same behavior.

    But calling the sub from my vb ocx in c#....it behaves normally.

    Thanks

  • Aussie Dazz

    Were you able to figure out what was happening in C#   If not, which event was firing twice   A few more details and we might be able to figure this one out, unless it's not that important anymore Big Smile

    Josh Lindenmuth



  • linga

    Am I understanding correctly that you solved the problem   If so, great!  If not, let me know what I can do to help ...

    Josh

  • activex control in C#