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. on closing event of old form new form should be visible and after verification both form sh'd close

on closing event of old form new form should be visible and after verification both form sh'd close

Scheduled Pinned Locked Moved C#
csharphelp
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.
  • F Offline
    F Offline
    fgfdhghgfd
    wrote on last edited by
    #1

    hi everybody, i m creating a browser in 2005 .net using c#.i came across the problem.i want to open a new form on closing event of old form. New form has field userid n password,only after verifying valid user both form should be closed.if user is not valid then old form should not be closed. if any idea then send me some clue if possible please send me source code in c#.

    G C 2 Replies Last reply
    0
    • F fgfdhghgfd

      hi everybody, i m creating a browser in 2005 .net using c#.i came across the problem.i want to open a new form on closing event of old form. New form has field userid n password,only after verifying valid user both form should be closed.if user is not valid then old form should not be closed. if any idea then send me some clue if possible please send me source code in c#.

      G Offline
      G Offline
      Giorgi Dalakishvili
      wrote on last edited by
      #2

      Show the new form in the onclosing event of the first one. After validating it close the new form and the old form will be closed too. If you want to cancel closing of old form have a look at the second argument of the onclosing event

      1 Reply Last reply
      0
      • F fgfdhghgfd

        hi everybody, i m creating a browser in 2005 .net using c#.i came across the problem.i want to open a new form on closing event of old form. New form has field userid n password,only after verifying valid user both form should be closed.if user is not valid then old form should not be closed. if any idea then send me some clue if possible please send me source code in c#.

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        You want people to provide credentials in order to close your app ? Yeah, handle the onclosing event and set the properties of the event args to cancel the close if you need to.

        Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        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