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. Web Development
  3. how to disable the close button from Form

how to disable the close button from Form

Scheduled Pinned Locked Moved Web Development
csharpasp-nettutorial
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.
  • C Offline
    C Offline
    Chetan visodiya
    wrote on last edited by
    #1

    Hi, I have one form in Asp.net and I want to remove ( disable) the close, maximize when opening the this Form. I write the following code. window.open("/QCOnline/Source/Password.aspx","_blank","toolbar=no,close=no ,top=270,left=350, location=no, directories=no, status =no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=340, height=187"); Maximize button is disable but close button is stil enable. So Please if you know how to disable the close button. thanks in advance . Chetan

    C C 2 Replies Last reply
    0
    • C Chetan visodiya

      Hi, I have one form in Asp.net and I want to remove ( disable) the close, maximize when opening the this Form. I write the following code. window.open("/QCOnline/Source/Password.aspx","_blank","toolbar=no,close=no ,top=270,left=350, location=no, directories=no, status =no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=340, height=187"); Maximize button is disable but close button is stil enable. So Please if you know how to disable the close button. thanks in advance . Chetan

      C Offline
      C Offline
      CWIZO
      wrote on last edited by
      #2

      You can't. It would be a horrible world if you could. -------------------------------------------------------- My portfolio & development blog Q:What does the derived class in C# tell to it's parent? A:All your base are belong to us!

      1 Reply Last reply
      0
      • C Chetan visodiya

        Hi, I have one form in Asp.net and I want to remove ( disable) the close, maximize when opening the this Form. I write the following code. window.open("/QCOnline/Source/Password.aspx","_blank","toolbar=no,close=no ,top=270,left=350, location=no, directories=no, status =no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=340, height=187"); Maximize button is disable but close button is stil enable. So Please if you know how to disable the close button. thanks in advance . Chetan

        C Offline
        C Offline
        CatInTheSombrero
        wrote on last edited by
        #3

        Sorry to break it, but there is no way to do that, and for good reason. Disabling the close means the user can't shut the window down (horrible), and before someone says "What about Alt+F4, or ending it from Ctrl+Alt+Delete", remember not all people are very good with computers like that.

        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