+ Post New Thread
Page 3 of 3 FirstFirst 123
Results 31 to 36 of 36
Coding Thread, C# - Button delay timer in Coding and Web Development; Originally Posted by JoshJohnson OK maybe I'm misunderstanding, but e.CloseReason == CloseReason.UserClose is true if the user has tried to ...
  1. #31

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,859
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    Quote Originally Posted by JoshJohnson View Post
    OK maybe I'm misunderstanding, but e.CloseReason == CloseReason.UserClose is true if the user has tried to close the form, not the OS, isn't it?
    Ye-es... and then if this is the case, we cancel the pending close message. Otherwise there was some other reason for closing it (e.g. the machine is shutting down) and we just keep quiet and let it.

  2. #32

    LosOjos's Avatar
    Join Date
    Dec 2009
    Location
    West Midlands
    Posts
    5,447
    Thank Post
    1,438
    Thanked 1,168 Times in 797 Posts
    Rep Power
    707
    Quote Originally Posted by powdarrmonkey View Post
    Ye-es... and then if this is the case, we cancel the pending close message.
    But then !btnClose.Enabled is true if the button is disabled, so we're allowing the form to be closed by the user when the button is still disabled...

  3. #33

    Gatt's Avatar
    Join Date
    Jan 2006
    Posts
    6,658
    Thank Post
    858
    Thanked 646 Times in 429 Posts
    Rep Power
    498
    Quote Originally Posted by JoshJohnson View Post
    But then !btnClose.Enabled is true if the button is disabled, so we're allowing the form to be closed by the user when the button is still disabled...
    IIRC - If windows is shutting down, and the app wont close properly, it will "End Task" it anyway so even if the button is disabled - the app will still closeas its an OS call.

    I think!

  4. #34

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,859
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    Quote Originally Posted by JoshJohnson View Post
    But then !btnClose.Enabled is true if the button is disabled,
    Ye-es, in which case we cancel the close request because the user shouldn't be able to close it yet...

    so we're allowing the form to be closed by the user when the button is still disabled...
    Not so. We are cancelling the user's request to close it if the button is still disabled.

  5. #35

    LosOjos's Avatar
    Join Date
    Dec 2009
    Location
    West Midlands
    Posts
    5,447
    Thank Post
    1,438
    Thanked 1,168 Times in 797 Posts
    Rep Power
    707
    Got it!

    @powdarrmonkey, sorry I doubted you

    @Gatt, sorry for confusing things!

  6. #36

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,859
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    NP



    .

SHARE:
+ Post New Thread
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Anybody got free countdown timer?
    By Hightower in forum Educational Software
    Replies: 17
    Last Post: 19th December 2009, 01:56 PM
  2. LANSchool - inactivity timer kicking in
    By googlemad in forum Network and Classroom Management
    Replies: 3
    Last Post: 19th February 2009, 09:31 PM
  3. First timer
    By Simcfc73 in forum BETT 2014
    Replies: 7
    Last Post: 1st December 2008, 08:23 AM
  4. HELP:::Internet Timer
    By bats in forum Downloads
    Replies: 5
    Last Post: 13th June 2008, 11:23 PM
  5. Countdown Timer to School Holidays
    By mattpant in forum Coding
    Replies: 4
    Last Post: 17th January 2007, 11:42 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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