HifeMDIChild




Declare Function FindWindow% Lib "User" (ByVal lpClassName&, ByVal lpWindowName$)
Declare Sub SetWindowPos Lib "User" (ByVal hWnd%, ByVal hWndInsertAfter%, ByVal X%,
ByVal Y%, ByVal cx%, ByVal cy%, ByVal wFlags%)
' Add this code to the appropriate event:

Dim r%
Dim myhWnd%
' Shell to executable and load the file

r = Shell("Notepad c:\autoexec.bat", 1)
DoEvents ' Let the app load completely
' Get the executable window handle based on window's title

myhWnd = FindWindow(0, "Notepad - AUTOEXEC.BAT")
' Move the window to the desired location

' Parms 3 and 4 are top and left,

' 5 and 6 are window height and width

SetWindowPos myhWnd, -1, 10, 10, 200, 300, SWP_SHOWWINDOW










( hifemdichild.html )- by Paolo Puglisi - Modifica del 17/12/2023