VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Finds out if your program has the focus by using an API.

by NicholsSoftware (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Tue 27th March 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Finds out if your program has the focus by using an API.

Rate Finds out if your program has the focus by using an API.



    If Focus Then
        Me.Caption = "Got Focus"
    Else
        Me.Caption = "Lost Focus"
    End If
End Sub

Function Focus() As Boolean
    If GetFocus = 0 Then
        Focus = False
    Else
        Focus = True
    End If
End Function

Download this snippet    Add to My Saved Code

Finds out if your program has the focus by using an API. Comments

No comments have been posted about Finds out if your program has the focus by using an API.. Why not be the first to post a comment about Finds out if your program has the focus by using an API..

Post your comment

Subject:
Message:
0/1000 characters