bartek bartek -3 years ago 184
C# Question

C# - opening process and changing window position

I want to open from c# an application (standalone flashplayer) and set it position to (0,0) on the screen. How can I do this? So far I've managed to open flashplayer:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace swflauncher
{
class Program
{
static void Main(string[] args)
{
Process flash = new Process();
flash.StartInfo.WindowStyle = ProcessWindowStyle.Normal;

flash.StartInfo.FileName = "D:\\development\\flex4\\runtimes\\player\\10\\win\\FlashPlayer.exe";
flash.Start();
}
}
}

Answer Source

Try SetWindowPos as described here. This page shows how to call it from C#.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download