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. Windows Forms
  4. on successful login, close login screen and activate MDI screen

on successful login, close login screen and activate MDI screen

Scheduled Pinned Locked Moved Windows Forms
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.
  • S Offline
    S Offline
    S Aijaz
    wrote on last edited by
    #1

    when login credential are succesfull i want to show mdi form and close login screen. in VB.net i have done it simply as below and is working fine: Me.Dispose() Me.Close() AttendanceMDI.ShowDialog() in c# i did it like this.Dispose(); this.Close(); AttendanceMDI.ShowDialog(); but it closes the application plz help....

    D D 2 Replies Last reply
    0
    • S S Aijaz

      when login credential are succesfull i want to show mdi form and close login screen. in VB.net i have done it simply as below and is working fine: Me.Dispose() Me.Close() AttendanceMDI.ShowDialog() in c# i did it like this.Dispose(); this.Close(); AttendanceMDI.ShowDialog(); but it closes the application plz help....

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      Use Show instead of ShowDialog and just hide the login form after the call to Show method. Do not close or dispose the login form.

      50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!

      1 Reply Last reply
      0
      • S S Aijaz

        when login credential are succesfull i want to show mdi form and close login screen. in VB.net i have done it simply as below and is working fine: Me.Dispose() Me.Close() AttendanceMDI.ShowDialog() in c# i did it like this.Dispose(); this.Close(); AttendanceMDI.ShowDialog(); but it closes the application plz help....

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        The login form should NOT be your startup form. The MDIParent form should be the startup and if it finds that the user needs to login, it shows your login dialog.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008
        But no longer in 2009...

        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