06-03-17, 04:19 PM
اسف اذا كان الموضوع السابق كان مخالف للقوانين
المشكلة ان الناتج 0
كود :
If Process.GetProcessesByName("calc").Length > 0 Then
Dim calc_size As System.Drawing.Size
Dim processWindowHandle As IntPtr = Process.GetProcessesByName("calc")(0).MainWindowHandle
Dim s As Size = GetControlSize(processWindowHandle)
calc_size = s
Dim GWL_STYLE As Integer = -16
Dim style As Integer = GetWindowLong(processWindowHandle, GWL_STYLE)
original_style = style
SetWindowLong(processWindowHandle, GWL_STYLE, original_style)
MsgBox(calc_size.Width)
End If