TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Michael
NA
7
0
string[]args
Aug 20 2005 8:24 PM
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.
Reply
Answers (
1
)
Error code
more on string[] args