小编典典

打开过程和更改窗口位置

c#

我想从C#中打开一个应用程序(独立Flash
Player),并将其在屏幕上的位置设置为(0,0)。我怎样才能做到这一点?到目前为止,我已经成功打开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();
        }
    }
}

阅读 298

收藏
2020-05-19

共1个答案

小编典典

SetWindowPos按照此处所述尝试。页面显示了如何从C#调用它。

2020-05-19