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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. .NET C# CLI/C++

.NET C# CLI/C++

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpquestionc++help
4 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.
  • Z Offline
    Z Offline
    ZawMinTun
    wrote on last edited by
    #1

    Hi all, I hope I put this question in a right category. I have a base class (let's call MyWindow) in C# which is based from UserControl. MyWindow is used as a base class in other projects of the same solution, and the projects are written in different languages, some C# and some C++(CLI). In C#, it's working properly. The Load event of the inheriting control is fired when the control is created in our application in run-time. But for CLI/C++ projects, the Load event of the inheriting control is never fired. Can you please give me some information to settle this? Thanks for your help and time, Zaw Min Tun

    A 1 Reply Last reply
    0
    • Z ZawMinTun

      Hi all, I hope I put this question in a right category. I have a base class (let's call MyWindow) in C# which is based from UserControl. MyWindow is used as a base class in other projects of the same solution, and the projects are written in different languages, some C# and some C++(CLI). In C#, it's working properly. The Load event of the inheriting control is fired when the control is created in our application in run-time. But for CLI/C++ projects, the Load event of the inheriting control is never fired. Can you please give me some information to settle this? Thanks for your help and time, Zaw Min Tun

      A Offline
      A Offline
      Addy Tas
      wrote on last edited by
      #2

      Have you checked the CLR setting in the projects config?

      Cogito ergo sum

      Z 1 Reply Last reply
      0
      • A Addy Tas

        Have you checked the CLR setting in the projects config?

        Cogito ergo sum

        Z Offline
        Z Offline
        ZawMinTun
        wrote on last edited by
        #3

        Dear Addy Tas, Thanks for your reply. Yes, CLR setting is checked. But now I found out that it's happening only in some CLI/C++ projects. In other CLI/C++ projects, the load event is fired. So now I'm trying to pin-point what's wrong with those projects, but still can't get a clue though I spent so many days on it. The projects are actually UserControl projects and we have another function to call such as Init() after creating the control. If I can't pin-point why it's happening, I'm thinking I will move the code lines from the Load-event to that Init() function. Regards, Zaw Min Tun

        A 1 Reply Last reply
        0
        • Z ZawMinTun

          Dear Addy Tas, Thanks for your reply. Yes, CLR setting is checked. But now I found out that it's happening only in some CLI/C++ projects. In other CLI/C++ projects, the load event is fired. So now I'm trying to pin-point what's wrong with those projects, but still can't get a clue though I spent so many days on it. The projects are actually UserControl projects and we have another function to call such as Init() after creating the control. If I can't pin-point why it's happening, I'm thinking I will move the code lines from the Load-event to that Init() function. Regards, Zaw Min Tun

          A Offline
          A Offline
          Addy Tas
          wrote on last edited by
          #4

          Hi, An easy way to find out where it goes wrong is to add console.writeline as spcific places and see if it got there. Than slowly work your way to the line that is giving you problems. Either you find out why you have the issue or just move it to the init method. Good luck, AT

          Cogito ergo sum

          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