1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
Public Class Frm1
Private Declare Auto Function MoveWindow Lib "user32" (ByVal handle As IntPtr, ByVal x As Integer, ByVal y As Integer, ByVal width As Integer, ByVal height As Integer, ByVal redraw As Boolean) As Boolean
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Dim MonProcess As New Process()
MonProcess.StartInfo.FileName = "C:\Windows\explorer.exe"
MonProcess.StartInfo.Arguments = "E:\Nos Docs"
MonProcess.Start()
System.Threading.Thread.Sleep(25)
MoveWindow(MonProcess.MainWindowHandle, 10, 10, 300, 500, True)
End Sub
End Class |
Partager