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. C#
  4. window.showmodal

window.showmodal

Scheduled Pinned Locked Moved C#
helpquestion
5 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.
  • R Offline
    R Offline
    rbarzallo
    wrote on last edited by
    #1

    Hi, Can I use window.showmodal? Sombody help me?

    H 1 Reply Last reply
    0
    • R rbarzallo

      Hi, Can I use window.showmodal? Sombody help me?

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      You mean Form.ShowDialog? Yes, but you must dispose the Form when you don't need it anymore. Modal dialogs need to be disposed explicitly or you'll gradually consume more and more memory that won't be reclaimed because of native resources:

      using (MyForm form = new MyForm())
      {
      form.ShowDialog();
      }

      Using using this way ensures that even if an exception is thrown your modal form is disposed. See the .NET Framework SDK for the Form.ShowDialog method for more information.

      Microsoft MVP, Visual C# My Articles

      R 1 Reply Last reply
      0
      • H Heath Stewart

        You mean Form.ShowDialog? Yes, but you must dispose the Form when you don't need it anymore. Modal dialogs need to be disposed explicitly or you'll gradually consume more and more memory that won't be reclaimed because of native resources:

        using (MyForm form = new MyForm())
        {
        form.ShowDialog();
        }

        Using using this way ensures that even if an exception is thrown your modal form is disposed. See the .NET Framework SDK for the Form.ShowDialog method for more information.

        Microsoft MVP, Visual C# My Articles

        R Offline
        R Offline
        rbarzallo
        wrote on last edited by
        #3

        Thank you for ask, Sorry, but, I need to know Who can i use "window.showmodal" in web appl.

        H 1 Reply Last reply
        0
        • R rbarzallo

          Thank you for ask, Sorry, but, I need to know Who can i use "window.showmodal" in web appl.

          H Offline
          H Offline
          Heath Stewart
          wrote on last edited by
          #4

          Then you should be more specific about what you need. This question doesn't belong in this forum. Ask in the Web Development[^] forum.

          Microsoft MVP, Visual C# My Articles

          R 1 Reply Last reply
          0
          • H Heath Stewart

            Then you should be more specific about what you need. This question doesn't belong in this forum. Ask in the Web Development[^] forum.

            Microsoft MVP, Visual C# My Articles

            R Offline
            R Offline
            rbarzallo
            wrote on last edited by
            #5

            thanks for your amiability and your time.

            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