Results 1 to 9 of 9

Thread: Application start and close

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Location
    Iowa USA
    Posts
    118

    Application start and close

    Is there an event for Application_load and Application_cLose?

    I need this function, even if I kill the application via the IDE. Any ideas?

    reason: is I have a third party server that remember logins(permission) and after so many stops letting people login.

    thanks,

    Dean

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Application start and close

    is this ASP.NET or a Win Forms app?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Location
    Iowa USA
    Posts
    118

    Re: Application start and close

    Win Forms app

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Application start and close

    no there is no global event for when a windows form app closes... if you structure it correctly, using a sub main and application.run and application.exit, you can call aditional code before the exe exits, to notify your server the app is closing.. but if the process is terminated.. it is just killed where it stands... which is what the IDE does when you press the stop button, or if you kill the process in the taskmanager..

    the server should really be the thing to handle this though.. you don't mention what kind of server it is or what it does.. but as users interact with it, it should have a way to flag that their "Session" is still active, but after a session goes so long without activty, it is terminated at the server level, to open up a connection for someone else...

  5. #5

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Location
    Iowa USA
    Posts
    118

    Re: Application start and close

    Actually it is a PCMiler server, used for gathering Mileage.

    It needs to be logged out or the connections stay alive.

  6. #6
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Application start and close

    it doesn't have any sort of timeout built into it?

  7. #7

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Location
    Iowa USA
    Posts
    118

    Re: Application start and close

    Trying to avoid having to deal with that part.

    I will check into it though.

    Thanks,

    Dean

  8. #8
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Application start and close

    its really the ideal way... i mean what if the end user has a power outage.. no code you put in your client app will be able to tell the server that...

  9. #9

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Location
    Iowa USA
    Posts
    118

    Re: Application start and close

    Thanks again.

    Dean

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width