You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lblStatus.Text=lvEntries.Items.Count.ToString+" windows"+vbCrLf+"since last "+DateDiff(DateInterval.Minute,AppLaunchTime,DateTime.UtcNow).ToString+" minutes"
txtWindowStatus.Text="Started tracking active window"
90
-
91
-
lblStatus.Text=lvEntries.Items.Count.ToString+" windows"+vbCrLf+"since last "+DateDiff(DateInterval.Minute,AppLaunchTime,DateTime.UtcNow).ToString+" minutes"
' Used to track how long the app has been runnning.
11
+
DimAppLaunchTimeAsNewDate
12
+
13
+
PublicSubinitAppLaunchTime()
14
+
AppLaunchTime=DateTime.UtcNow
15
+
EndSub
16
+
17
+
PublicSublogStatus()
18
+
frmMain.lblStatus.Text=frmMain.lvEntries.Items.Count.ToString+" windows"+vbCrLf+"since last "+DateDiff(DateInterval.Minute,AppLaunchTime,DateTime.UtcNow).ToString+" minutes"
19
+
EndSub
20
+
21
+
PublicSublogActiveWindow()
22
+
23
+
WithfrmMain
24
+
25
+
' Get the Handle to the Current Foreground Window
26
+
DimhWndAsIntPtr=GetForegroundWindow()
27
+
IfhWnd=IntPtr.ZeroThenExitSub
28
+
29
+
' Find the Length of the Window's Title
30
+
DimTitleLengthAsInteger
31
+
TitleLength=GetWindowTextLength(hWnd)
32
+
33
+
' Find the Window's Title
34
+
DimWindowTitleAsString=StrDup(TitleLength+1,"*")
35
+
GetWindowText(hWnd,WindowTitle,TitleLength+1)
36
+
37
+
' Find the PID of the Application that Owns the Window
0 commit comments