AppSpecialist
Programmer
I have a closewindow function running on a timer to close a particular window if it is the active window.
I have found this code works on most PC's however, on one PC the VB program sees the window I am looking for is in foreground and it tries to minimize it, but cannot. All that happens is you see the screen flicker as the timer cuts in trying to minimize it... any thoughts?
Here is a stripped down version of code:
If AspectWinSetControl1.WinsetState = awWrapUp Then
fg_hwnd = GetForegroundWindow()
If UCase(RTrim(GetWindowTitle(fg_hwnd))) = "ASPECT WINSET" Then
CloseWindow(fg_hwnd)
ScrPop.Visible = True
ScrPop.Show
End If
End If
I have found this code works on most PC's however, on one PC the VB program sees the window I am looking for is in foreground and it tries to minimize it, but cannot. All that happens is you see the screen flicker as the timer cuts in trying to minimize it... any thoughts?
Here is a stripped down version of code:
If AspectWinSetControl1.WinsetState = awWrapUp Then
fg_hwnd = GetForegroundWindow()
If UCase(RTrim(GetWindowTitle(fg_hwnd))) = "ASPECT WINSET" Then
CloseWindow(fg_hwnd)
ScrPop.Visible = True
ScrPop.Show
End If
End If