Fremde Fenster positioniert starten,
Größe verändern
[Windows 95/98/NT/2000]

13.12.2000


Fremde Programme starten und anschließend positionieren.
     Dieses Beispiel startet den Rechner (calc.exe),
     positioniert ihn anschließend an die Koordinaten 0,0 
     und ändert die Fenstergröße

ERFORDERLICHE OBJEKTE

   1 CommandButton (Command1)
 FORM-CODE
   Private Declare Function FindWindow Lib "user32" Alias _
      "FindWindowA" (ByVal lpClassName As String, ByVal _
      lpWindowName As String) As Long
   Private Declare Function MoveWindow Lib "user32" (ByVal hwnd _
      As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, _
      ByVal nHeight As Long, ByVal bRepaint As Long) As Long
   Private Sub Command1_Click()
      Shell "calc.exe"
      DoEvents
      wHandle = FindWindow(vbNullString, "Rechner")
      MoveWindow wHandle, 0, 0, 270, 350, 1
   End Sub


Download - 2 KB