我想知道是否可以调整实际应用程序本身以外的程序大小。IE,我想调整和移动 Word 和我的应用程序以分别填充 70% 和 30% 的屏幕。
Private Sub MinimiseButton_Copy_Click(sender As Object, e As RoutedEventArgs) Handles MinimiseButton_Copy.Click
Me.Left = SystemParameters.PrimaryScreenWidth - Me.Width + 14
Me.Top = -14
Me.Height = SystemParameters.PrimaryScreenHeight
Dim parry As System.Diagnostics.Process() = System.Diagnostics.Process.GetProcessesByName("winword")
Dim word As System.Diagnostics.Process = parry(0)
SetWindowPos(word.Handle, 0, 0, 0, SystemParameters.PrimaryScreenWidth - Me.Width, SystemParameters.PrimaryScreenHeight - 28, &H10)
End Sub
<DllImport("user32.dll", CharSet:=CharSet.Auto)> Public Shared Function SetWindowPos(hWnd As IntPtr, hWndInsertAfter As IntPtr, X As Integer, Y As Integer, W As Integer, H As Integer, uFlags As UInteger) As Boolean
End Function