Imports System Imports System.Diagnostics Imports System.Runtime.InteropServices
Namespace E Public Class Program Public Structure RECT Public Left As Integer Public Top As Integer Public Right As Integer Public Bottom As Integer End Structure <DllImport("user32.dll")> _ Private Shared Function GetClientRect(ByVal hWnd As IntPtr, ByRef lpRect As RECT) As Boolean End Function Public Shared Sub Main(ByVal args As String()) Dim ps As Process() = Process.GetProcesses() For Each p As Process In ps Console.Write(p.ProcessName & " : ") If p.MainWindowHandle = IntPtr.Zero Then Console.WriteLine("Non GUI") Else Dim r As RECT GetClientRect(p.MainWindowHandle, r) Console.WriteLine((r.Right - r.Left) & " x " & (r.Bottom - r.Top)) End If Next Console.ReadKey() End Sub End Class End Namespace
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.