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. how to get button click in child effecting a parrent

how to get button click in child effecting a parrent

Scheduled Pinned Locked Moved C#
questiontutorial
3 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.
  • F Offline
    F Offline
    faladrim
    wrote on last edited by
    #1

    hi, if i press a delete button in parrent form form3 (how is in fact also a child of another form) i want to get a " are you sure? yer or no " screen so i made this in another form, form5. if i press no i just close form 5 but if i press yes something in the parent from has to happen. how do i do this? how do i make a sort of variable that works for both the forms? anybody any ideas links are also helpful :) thx

    A 1 Reply Last reply
    0
    • F faladrim

      hi, if i press a delete button in parrent form form3 (how is in fact also a child of another form) i want to get a " are you sure? yer or no " screen so i made this in another form, form5. if i press no i just close form 5 but if i press yes something in the parent from has to happen. how do i do this? how do i make a sort of variable that works for both the forms? anybody any ideas links are also helpful :) thx

      A Offline
      A Offline
      aamironline
      wrote on last edited by
      #2

      Create a public boolean property in a message dialog form, say YesClicked. On click of yes button set this property to true... This way you can get value from the dialog form.

      M Aamir Maniar aamirOnline.com

      F 1 Reply Last reply
      0
      • A aamironline

        Create a public boolean property in a message dialog form, say YesClicked. On click of yes button set this property to true... This way you can get value from the dialog form.

        M Aamir Maniar aamirOnline.com

        F Offline
        F Offline
        faladrim
        wrote on last edited by
        #3

        thx i forgot to delete delform.MdiParent = this.MdiParent; at fist :) its working fine now, but ... if the delete form comes up its not a child of something. is there a way to still use showdialog an get only one form opening (like the childs do in a parent)? thx anyway you've been a great help :D bye

        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