Learn when you want, where you want with convenient online training courses. Sign up now!
Experts Exchange Solution brought to you by
"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.
This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.
Public Class Form1
Private Sub Timer1_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If AppHasFocus("NotePad") Then
Label1.Text = "NotePad has Focus"
Label1.Text = "NotePad does NOT have Focus"
Private Declare Auto Function GetForegroundWindow Lib "user32.dll" () As IntPtr
Private Function AppHasFocus(ByVal ExeNameWithoutExtension As String) As Boolean
Dim activeHandle As IntPtr = GetForegroundWindow()
For Each p As Process In Process.GetProcessesByName(ExeNameWithoutExtension)
If p.MainWindowHandle.Equals(activeHandle) Then
Open in new window
Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.