C# newbie

  • Thread starter Thread starter Wayne A. via .NET 247
  • Start date Start date
W

Wayne A. via .NET 247

Hi All,

Not sure if I post this in right place.

I wonder that if I can use c# create an editor like VS.NET editor, I don't know what has been used, can anyone give me some detail info/reference?

Thanks a lot?
 
Wayne,

You could definitely do this, but it wouldn't be easy (I can't imagine
any framework that this would be easy in, as there is a lot that needs to be
done).

You would have to start with the classes in the System.Windows.Forms
namespace, as that will handle all of the UI elements. You might also want
to get acquainted with the P/Invoke layer, as you will probably call a good
number of APIs to handle certain functionality not afforded by the
framework. If you are looking for something like intellisense, then you
will need to familiarize yourself with the System.Reflection namespace as
well.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Wayne A. via .NET 247 said:
Hi All,

Not sure if I post this in right place.

I wonder that if I can use c# create an editor like VS.NET editor, I don't
know what has been used, can anyone give me some detail info/reference?
 
of course, check out WebMatrix or SharpDevelop (#develop), two good examples of free IDE written in C#.
 
Nicholas Paldino said:
Wayne,

You could definitely do this, but it wouldn't be easy

Definitely not.
Basically, I'd start with a custom control, and show some text in it; Then,
react to mouse events and maintain a cursor/selection state; After that,
handle simple keyboard commands (moving the cursor, inserting/deleting
characters); Then, add clipboard, undo/redo, syntax highlighting...
(I can't imagine
any framework that this would be easy in, as there is a lot that needs to be
done).

emacs comes to my mind... But then again only emacs-guru's claim emacs is
easy.
You would have to start with the classes in the System.Windows.Forms
namespace, as that will handle all of the UI elements. You might also want
to get acquainted with the P/Invoke layer, as you will probably call a good
number of APIs to handle certain functionality not afforded by the
framework.

Unfortunately, the Win32 platform offers little help for such a project, so
I don't think there is much use for PInvoke. (correct me if I'm wrong).

Niki
 
Niki,

The comment about the win32 platform wasn't to indicate that it would
help. Rather, it would be a necessity to interact with the windows in the
way that would be required, as I imagine that the framework will NOT offer
everything that is needed for this task.
 
Nicholas Paldino said:
Niki,

The comment about the win32 platform wasn't to indicate that it would
help. Rather, it would be a necessity to interact with the windows in the
way that would be required, as I imagine that the framework will NOT offer
everything that is needed for this task.

Do you really think so?
Displaying text; Handling mouse&keyboard events; Interacting with the
clipboard; Reading/writing files;
What exactly does a text editor do that's not possible inside the .net
framework?

Niki
 
Back
Top