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. closed messagabox in c# ???

closed messagabox in c# ???

Scheduled Pinned Locked Moved C#
csharphelpquestion
6 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.
  • A Offline
    A Offline
    aa_zz
    wrote on last edited by
    #1

    hi all. i using c#2005. i running application and show icon in tray taskbar. when i choice "Disable" in menu tray taskbar => closed all form opening, include forms, messagabox, but application not exit. i have closed forms if form not show message. if form show messagebox, it not closed. i wish your help. regards, aazz nothing

    L H 2 Replies Last reply
    0
    • A aa_zz

      hi all. i using c#2005. i running application and show icon in tray taskbar. when i choice "Disable" in menu tray taskbar => closed all form opening, include forms, messagabox, but application not exit. i have closed forms if form not show message. if form show messagebox, it not closed. i wish your help. regards, aazz nothing

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      it's hard to say, where the problem is, if you don't show the codes. but in my apps, if I call MessageBox.Show(...) and in tray "Close()" or "Application.Exit()", it works.

      A 1 Reply Last reply
      0
      • L Lost User

        it's hard to say, where the problem is, if you don't show the codes. but in my apps, if I call MessageBox.Show(...) and in tray "Close()" or "Application.Exit()", it works.

        A Offline
        A Offline
        aa_zz
        wrote on last edited by
        #3

        for exam: form A -> Form B -> show messagebox. if message not show, i can closed Form A and B, but message show i not closed form A and B and message. can we control messagebox ? nothing

        L 1 Reply Last reply
        0
        • A aa_zz

          for exam: form A -> Form B -> show messagebox. if message not show, i can closed Form A and B, but message show i not closed form A and B and message. can we control messagebox ? nothing

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          yes, because it's a modal window. http://en.wikipedia.org/wiki/Modal_window[^] MessageBox is a modal window. If you want to control it, then create your own messagebox, then call "Show()", and NOT "ShowDialog()".

          A 1 Reply Last reply
          0
          • L Lost User

            yes, because it's a modal window. http://en.wikipedia.org/wiki/Modal_window[^] MessageBox is a modal window. If you want to control it, then create your own messagebox, then call "Show()", and NOT "ShowDialog()".

            A Offline
            A Offline
            aa_zz
            wrote on last edited by
            #5

            i think, we need desig Form Messagebox by user control. at the time, we control it. you agree. nothing

            1 Reply Last reply
            0
            • A aa_zz

              hi all. i using c#2005. i running application and show icon in tray taskbar. when i choice "Disable" in menu tray taskbar => closed all form opening, include forms, messagabox, but application not exit. i have closed forms if form not show message. if form show messagebox, it not closed. i wish your help. regards, aazz nothing

              H Offline
              H Offline
              hammerstein05
              wrote on last edited by
              #6

              Do you have anything in your "disable" menu that minimizes the app if it's in full screen? The way I normally do this, I have to add something on my form_closing event to see if the user is actually minimizing when they hit the x. If they are, I minimize, otherwise I close. You might have something like e.Cancel = true stopping the app from actually shutting down.

              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