Freshman
Registered User.
- Local time
- Tomorrow, 01:33
- Joined
- May 21, 2010
- Messages
- 437
Hi all,
I'm using the Shell command in VBA to open a 3rd party app.
But I want to open in to a spesific location and size on the screen.
A Google seach gave me this solution:
But firstly I don't know what lanuage it is.
Secondly I need to do it in VBA.
Can anyone help please?
Thanks
I'm using the Shell command in VBA to open a 3rd party app.
But I want to open in to a spesific location and size on the screen.
A Google seach gave me this solution:
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
class Program {
static void Main(string[] args) {
var prc = Process.Start("notepad.exe");
prc.WaitForInputIdle();
bool ok = MoveWindow(prc.MainWindowHandle, 0, 0, 300, 200, false);
if (!ok) throw new System.ComponentModel.Win32Exception();
}
[DllImport("user32.dll", SetLastError = true)]
private static extern bool MoveWindow(IntPtr hWnd, int x, int y, int width, int height, bool repaint);
}
But firstly I don't know what lanuage it is.
Secondly I need to do it in VBA.
Can anyone help please?
Thanks