前田稔(Maeda Minoru)の超初心者のプログラム入門
![]()
![]()
using System.Diagnostics; // for Process |
/*********************************************/
/*★ Process でプログラムを起動 前田 稔 ★*/
/*********************************************/
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Diagnostics; // for Process
public class MyForm : Form
{
public MyForm()
{ Text = "Window のキャプションです";
BackColor = SystemColors.ControlLight;
}
}
class form01
{
public static void Main()
{ System.Diagnostics.Process process_1 =
Process.Start("C:\\Data\\CommandLine.exe","123 abc DEFG");
process_1.WaitForExit();
Console.WriteLine("プログラムの終了\n");
MyForm mf = new MyForm();
Application.Run(mf);
}
}
|
/*******************************/
/*★ Command Line 前田 稔 ★*/
/*******************************/
#include <stdio.h>
int main(int argc, char* argv[])
{
for(int i=0; i<argc; i++)
printf("%d %s\n", i,argv[i]);
return(0);
}
|
![]()
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Diagnostics; // for Process
public class MyForm : Form
{
public MyForm()
{ Text = "Window のキャプションです";
BackColor = SystemColors.ControlLight;
}
}
class form01
{
public static void Main()
{ System.Diagnostics.Process.Start("C:\\Data\\Test\\data.txt");
MyForm mf = new MyForm();
Application.Run(mf);
}
}
|
![]()