Hi,
I want to launch Access project and want to control the position and the
size of the window.
My logic below positions Access window at upper left corner in minimized
size.
************************************************** *****
Private Sub btnLaunch_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnLaunch.Click
AccApp = New Access.Application
AccApp.OpenAccessProject("C:\test\test.adp")
AccApp.Visible = True
Dim rtVal As Long
Dim hwndP As Long
hwndP = AccApp.hWndAccessApp()
rtVal = MoveWindow(hwndP, 0, 0, 850, 500, 1)
End Sub
************************************************** *****
I also tried the logic below.
This one opens the project in the way its was opened previously. That is to
say [MoveWindow] ( [FindWindow] also ) is not effective at all.
Please help.
Thank you
************************************************** *****
Private Sub btnAccess_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnAccess.Click
Dim ProcID As Integer
Dim rtVal As Long
Dim hwndP As Long
ProcID = Shell("C:\Program Files\Microsoft
Office\OFFICE11\MSACCESS.EXE C:\test\test.adp", AppWinStyle.NormalFocus,
False)
hwndP = FindWindow("OMain", 0)
If hwndP = 0 Then
Exit Sub
Else
rtVal = MoveWindow(hwndP, 0, 0, 240, 320, 1)
End If
End Sub
************************************************** *****