Hi,
Below is the program which works properly in non-thinstall application but not in thinstall application which is mentioned in bold.
Please help to solve this proble.
-
Private Sub subShowRunningTasks()
' Show NBSS running tasks in the listview.
Dim lngCurrWnd As Long
Dim lngLen As Long
Dim strWindowCaption As String
Dim lngParent As Long
Dim lngResult As Long
Dim lngReturnValue As Long
Dim strExePath As String
Dim objNewItem As ListItem
' Step through windows.
lngCurrWnd = GetWindow(Me.hWnd, GW_HWNDFIRST)
'
While lngCurrWnd <> 0
lngLen = GetWindowTextLength(lngCurrWnd)
' it return 0 in Thinstall app but in non-thinstall app returns >0 means something problem in API that not able to work properly with thinstall
MsgBox funstrGetExePathFromHwnd(lngCurrWnd)
MsgBox WindowText(lngCurrWnd)
If lngLen > 0 Then
If funblnIsTask(lngCurrWnd) Then
' Get the window caption (put into variable "strWindowCaption").
strWindowCaption = Space(lngLen)
GetWindowText lngCurrWnd, strWindowCaption, lngLen + 1
' Get the exe path.
strExePath = funstrGetExePathFromHwnd(lngCurrWnd)
If funblnInList(funstrExeName(strExePath), lstTasks) Then
Set objNewItem = lvwRunningTasks.ListItems.Add(, , strWindowCaption, 1, 1)
End If
End If
End If
lngCurrWnd = GetWindow(lngCurrWnd, GW_HWNDNEXT)
Wend
End Sub
-
Thanks,