c#start process python.exe scriptedsandbox64.exe已经停止 [英] c# start process python.exe scriptedsandbox64.exe has stopped
本文介绍了c#start process python.exe scriptedsandbox64.exe已经停止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在正确路径之后,使用System获得了scriptedsandbox64.exe
after correct path , got scriptedsandbox64.exe has stopped
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Timers;
using System.Windows.Forms;
using System.Threading;
namespace TransparentWindow
{
public partial class Form1 : Form
{
System.Timers.Timer timer;
private static Form1 theform;
public Form1()
{
InitializeComponent();
this.Opacity = 0.5;
this.TopMost = true;
theform = this;
timer = new System.Timers.Timer(10*1000);
timer.Elapsed += OnTimedEvent;
timer.Enabled = true;
timer.AutoReset = true;
timer.Start();
}
private static void OnTimedEvent(object source, ElapsedEventArgs e)
{
theform.Invoke(new MethodInvoker(delegate { theform.WindowState = FormWindowState.Minimized; }));
theform.Invoke(new MethodInvoker(delegate { theform.Refresh(); }));
ProcessStartInfo start = new ProcessStartInfo();
start.FileName = @"C:\Python27\python.exe";
start.WorkingDirectory = @"C:\Users\martlee2\Documents\Visual Studio 2017\Projects\TransparentWindow\TransparentWindow\bin\Debug\";
start.Arguments = @" C:\Users\martlee2\Documents\Visual Studio 2017\Projects\TransparentWindow\TransparentWindow\bin\Debug\comparephoto.py --first 08102017.png --second 09102017.png";
start.UseShellExecute = true;
start.CreateNoWindow = false;
Process process = Process.Start(start);
process.WaitForExit();
process.Close();
Image myimage = new Bitmap(@"C:\Users\martlee2\Documents\Visual Studio 2017\Projects\TransparentWindow\TransparentWindow\bin\Debug\ImageC.png");
theform.BackgroundImage = myimage;
theform.Invoke(new MethodInvoker(delegate { theform.WindowState = FormWindowState.Maximized; }));
theform.Invoke(new MethodInvoker(delegate { theform.Refresh(); }));
}
}
}
MEALY
推荐答案
嗨MEALY,
Hi MEALY,
请禁用诊断工具位于:
工具 - >选项 - >调试 - >一般 - >在调试时启用诊断工具
Tools -> Options -> Debugging -> General -> Enable Diagnostic Tools while debugging
更多详情请参阅以下类似文件:
More details please refer to the following similar document:
ScriptedSandbox64.exe已停止工作 - Visual Studio 2015.
希望这有帮助!
最好的问候,
Stanly
这篇关于c#start process python.exe scriptedsandbox64.exe已经停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文