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. Small Problem in Windows application....

Small Problem in Windows application....

Scheduled Pinned Locked Moved C#
helpquestion
4 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
    Krishna Varadharajan
    wrote on last edited by
    #1

    Hi, When i run a application a small popup like login form will appear so if i login thn it will go to next page...or if i click the button cancel or close it that popup login it will disappear. My task is... after login if i close the main application same login pop-up should come and after i login using my username and password should close the application completely. My problem is.... i can able to do the same by above...but in that popup login form if i do close or cancel only that pop-up window should close not the complete application,,,,but now the complete application is getting closed due to the same login form. So wht is the solution for this ???? Hope you can understand my problem.

    krishna

    L 2 Replies Last reply
    0
    • K Krishna Varadharajan

      Hi, When i run a application a small popup like login form will appear so if i login thn it will go to next page...or if i click the button cancel or close it that popup login it will disappear. My task is... after login if i close the main application same login pop-up should come and after i login using my username and password should close the application completely. My problem is.... i can able to do the same by above...but in that popup login form if i do close or cancel only that pop-up window should close not the complete application,,,,but now the complete application is getting closed due to the same login form. So wht is the solution for this ???? Hope you can understand my problem.

      krishna

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

      krishnavaradharajan wrote:

      but now the complete application is getting closed due to the same login form. So wht is the solution for this ????

      Create the login form from your mainform. Next, show the login-form as a modal dialog. The application closes as soon as the mainform closes (that's the one in the Program.cs file, in the Application.Run statement).

      I are Troll :suss:

      K 1 Reply Last reply
      0
      • K Krishna Varadharajan

        Hi, When i run a application a small popup like login form will appear so if i login thn it will go to next page...or if i click the button cancel or close it that popup login it will disappear. My task is... after login if i close the main application same login pop-up should come and after i login using my username and password should close the application completely. My problem is.... i can able to do the same by above...but in that popup login form if i do close or cancel only that pop-up window should close not the complete application,,,,but now the complete application is getting closed due to the same login form. So wht is the solution for this ???? Hope you can understand my problem.

        krishna

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

        You should use Form.ShowDialog()[^] to display your login form from within your main form code.

        It's time for a new signature.

        1 Reply Last reply
        0
        • L Lost User

          krishnavaradharajan wrote:

          but now the complete application is getting closed due to the same login form. So wht is the solution for this ????

          Create the login form from your mainform. Next, show the login-form as a modal dialog. The application closes as soon as the mainform closes (that's the one in the Program.cs file, in the Application.Run statement).

          I are Troll :suss:

          K Offline
          K Offline
          Krishna Varadharajan
          wrote on last edited by
          #4

          Ya i created in same way, thts y if i close login form mainform also getting closed...but it should not close the main form...only login form should get close. Thanks

          krishna

          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