C# - 开放进程,并改变窗口的位置 [英] C# - opening process and changing window position

查看:129
本文介绍了C# - 开放进程,并改变窗口的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从C#打开一个应用程序(独立的Adobe Flash),并设置在屏幕上的位置(0,0)。我怎样才能做到这一点?到目前为止,我已经成功地打开FlashPlayer的:

 使用系统; 
使用System.Collections.Generic;
使用System.Linq的;
使用System.Text;使用System.Diagnostics程序
;

命名空间swflauncher
{
类节目
{
静态无效的主要(字串[] args)
{
工艺闪存=新工艺();
flash.StartInfo.WindowStyle = ProcessWindowStyle.Normal;

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


解决方案

尝试 SetWindowPos 。 ASPX>此处。 页面显示了如何从C#调用。


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();
        }
    }
}

解决方案

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

这篇关于C# - 开放进程,并改变窗口的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆