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. Child Form From its parent form

Child Form From its parent form

Scheduled Pinned Locked Moved C#
3 Posts 3 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.
  • E Offline
    E Offline
    Enobong Adahada
    wrote on last edited by
    #1

    Pls i want to access the private methods and events of a MDIChild Form from its parent Form and execute them, I do not know the how. Thanks.

    L A 2 Replies Last reply
    0
    • E Enobong Adahada

      Pls i want to access the private methods and events of a MDIChild Form from its parent Form and execute them, I do not know the how. Thanks.

      L Offline
      L Offline
      Lukasz Nowakowski
      wrote on last edited by
      #2

      Firstly: you shouldn't do it. If method is to be called from outside of the class, it should be public, not private. And that's the path you should follow. The backdoor to access private methods and fields is reflection (but it's bad). But I think you can solve your issue by changing methods' access to public.

      1 Reply Last reply
      0
      • E Enobong Adahada

        Pls i want to access the private methods and events of a MDIChild Form from its parent Form and execute them, I do not know the how. Thanks.

        A Offline
        A Offline
        Anshul R
        wrote on last edited by
        #3

        You can also try Protected Friend in their declarations

        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