Well. I have an application that I want to capture some parms.
So here it is. It succesfully retrieves the text and puts it in my Made richTextbox
// CODE
using System.Windows.Forms;
class Editor: Form
{
public static void Main(string[] args)
{
RichTextBox richedit;
Form form;
richedit = new RichTextBox();
form = new Form();
richedit.Parent = form;
richedit.Dock = DockStyle.Fill;
if (args.Length > 0) {
richedit.LoadFile(args[0], RichTextBoxStreamType.PlainText);
}
Application.Run(form);
}
}
// END
but I want the text to go into my already made richTextBox1 in my windows forms. But it just won't pick my richTextBox in my windows form in the Static Void. heres the code
// CODE
using
System;
using
System.Collections.Generic;
using
System.Windows.Forms;
namespace
brandnwe
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[
STAThread]
static void Main(string[] args)
{
if (args.Length > 0)
{
richTextBox1.LoadFile(args[0],
RichTextBoxStreamType.PlainText);
}
Application.EnableVisualStyles();
Application.Run(new Form1());
}
}
// CODE
Help please.