Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.net更改过程Windows字体_.net_Vb.net - Fatal编程技术网

.net更改过程Windows字体

.net更改过程Windows字体,.net,vb.net,.net,Vb.net,我有这样一个代码: Dim psi As New ProcessStartInfo("ABC.EXE") psi.RedirectStandardError = True psi.RedirectStandardOutput = True psi.CreateNoWindow = False psi.WindowStyle = ProcessWindowStyle.Normal psi.UseShellExecute = False psi.WorkingDirectory = "

我有这样一个代码:

 Dim psi As New ProcessStartInfo("ABC.EXE")
 psi.RedirectStandardError = True
 psi.RedirectStandardOutput = True
 psi.CreateNoWindow = False
 psi.WindowStyle = ProcessWindowStyle.Normal
 psi.UseShellExecute = False
 psi.WorkingDirectory = "n:\invdat"
 Dim p As Process = Process.Start(psi)
此程序启动一个字符库应用程序。我想更改此字符基应用程序的字体


我想通过左上角单击应用程序图标并选择Properties(属性)来重现更改,如果旧程序使用standard out(标准输出),则这可能会捕获输出

        Dim start_info As New ProcessStartInfo("RoboCopy", sParams)
        start_info.UseShellExecute = False
        start_info.CreateNoWindow = True
        start_info.RedirectStandardOutput = True
        start_info.RedirectStandardError = True

        ' Make the process and set its start information.
        Dim proc As New Process()
        proc.StartInfo = start_info

        ' Start the process.
        proc.Start()

        ' Attach to stdout and stderr.
        Dim std_out As StreamReader = proc.StandardOutput()
        Dim std_err As StreamReader = proc.StandardError()

        ' Get the results.
        Dim sOut As String = std_out.ReadToEnd()
        Dim sErr As String = std_err.ReadToEnd()

然后,您可以在Winform中显示来自sOut的结果。

在Visual Studio桌面中,您有三个常见选择;控制台应用程序和窗体:WinForms或WPF。如果你想要一个菜单,你的程序可以使用WinForms/WPF。“表单”只能承载一个停靠在表单边缘的文本框。如果你正在考虑类似手机的应用程序,我不确定什么是最好的选择。您使用的是什么开发环境?目标平台是什么。我的流程是一个旧的TextBase应用程序。我不想重写它,只想在当前应用程序中启动我的应用程序(WinForm应用程序)。当我启动我的应用程序(通过Process.Start)时,这个应用程序会在一个非常小的窗口中打开。我想更改此窗口的字体。我的程序是一个完整的文本库应用程序,带有菜单、编辑部分。这是一个旧的Cobol应用程序。您可能无法从程序外部更改显示字体。使用SendKeys可以捕获文本的可能性很小。如果应用程序具有更改字体的菜单,SendKeys可能会工作。查找有关Cobol应用程序显示字体的注册表项。您是否可以将Cobol平台的任何标记添加到OP中?