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 do i find if user clik "ok" on my Modal Dialog?

How do i find if user clik "ok" on my Modal Dialog?

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.
  • K Offline
    K Offline
    Karavaev Denis
    wrote on last edited by
    #1

    Or how to return parametr to main wnd, when my modal dialog is closing?

    C 1 Reply Last reply
    0
    • K Karavaev Denis

      Or how to return parametr to main wnd, when my modal dialog is closing?

      C Offline
      C Offline
      Chad Smith
      wrote on last edited by
      #2

      Set the OK button's DialogResult property to OK. Then use this code in the main/calling form. frmInput dlg = new frmInput(); if(dlg.ShowDialog(this) == DialogResult.OK) { // Code to run on OK }

      K 1 Reply Last reply
      0
      • C Chad Smith

        Set the OK button's DialogResult property to OK. Then use this code in the main/calling form. frmInput dlg = new frmInput(); if(dlg.ShowDialog(this) == DialogResult.OK) { // Code to run on OK }

        K Offline
        K Offline
        Karavaev Denis
        wrote on last edited by
        #3

        OK, it works, thanks. But it I need to get some data from my modal dialog? If I'm typing some string and after closing dialog i need to add this string into my listbox on main window? ===================== http://wasp.elcat.kg

        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