Results 1 to 6 of 6

Thread: Form Focused & unfocused

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2002
    Location
    ENGLAND
    Posts
    38

    Form Focused & unfocused

    Dear All
    I like to start a timer when the form Unfocused
    and i like to reset the timer when the form focused
    when the timer expired during the unfocused period
    I like to close the form
    I want to do this for security reason
    any help or advise will be very much apreciated
    salih
    sa

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Use LostFocus and GotFocus events of the form .

  3. #3

    Thread Starter
    Member
    Join Date
    Aug 2002
    Location
    ENGLAND
    Posts
    38

    Form Focused & unfocused

    Dear Friend
    Form has not got LostFocus & GotFocus
    Properties
    many thanks
    salih
    sa

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    huh ? I said events of the form not properties .

  5. #5

    Thread Starter
    Member
    Join Date
    Aug 2002
    Location
    ENGLAND
    Posts
    38

    Form Focused & unfocused

    I am very sorry
    actually I mean Event
    I could not find any form event support
    LostFocus & GotFocus
    Many Thanks
    salih
    sa

  6. #6
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    VB Code:
    1. Private Sub Form1_LostFocus(ByVal sender As Object, ByVal e As
    2. System.EventArgs) Handles MyBase.LostFocus
    3.  
    4. 'Enable/Disable the timer
    5.  
    6. End Sub
    7.  
    8.  
    9. Private Sub Form1_GotFocus(ByVal sender As Object, ByVal e As
    10. System.EventArgs) Handles MyBase.GotFocus
    11.  
    12. 'Enable/Disable the timer
    13.  
    14. End Sub

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