Word Processor using VC#. Please help

Started by
10 comments, last by BjsAust 13 years, 6 months ago
Hi all,

I am newbie with Visual Studio 2010. But I am suppose to create a Word processor using it. I know little bit of C#, we are suppose to use VC#. Richtext control box and other tools are relatively simple it seems.

However I am suppose to use lots of programming to make something like MS Word or use my own idea to have formatting, spell check and so on. The full evaluation of this subject is based on this project and every week in lab we are suppose to report and do something towards the project. There is little more than a month to learn and complete it.

I have no idea what to do and how to do it. Please help!
Advertisement
Well, this sounds like a fun game you are making. :-)

That aside, what have you tried so far, what have you read and researched, have you attempted to search google?
To assist you, we need to know exactly where you are stuck not just 'how do i do my project'.
Yeah I have been searching on internet. I know C++ but VC# is new to me. I am learning how to use VS 2010. It is easy to create menu and rich text box just by dragging and placing it on the form. But we are suppose to use some programming, event handlers, what user type should be checked and formatted automatically and so on ? Like in MS word if you type first letter as small it gets Caps.

I am not sure what to do. Just getting used to VC#
Quote:Original post by braindigitalis
Well, this sounds like a fun game you are making. :-)

That aside, what have you tried so far, what have you read and researched, have you attempted to search google?
To assist you, we need to know exactly where you are stuck not just 'how do i do my project'.


I also agree with braindigitalis. Saying that, I don't know how I would create that application myself, especially since I do not know what your lectures are specifically looking for. However I would start by creating a windows form application project. Make sure you select the one under C#. This will at least allow you to add text boxes and etc. I do not know much of anything about application development so I could be wrong.
Quote:Original post by kimi
I have no idea what to do and how to do it. Please help!

Other than saying "hang in there, you can do it!", there's not much more we can do I'm afraid. [smile]
Quote:Yeah I have been searching on internet. I know C++ but VC# is new to me. I am learning how to use VS 2010.

That's a start. If you are completely new to a language/framework, it's probably a good idea to get yourself some learning material (a book, the official documentation, a series of online articles).
Quote:But we are suppose to use some programming, event handlers, what user type should be checked and formatted automatically and so on ? Like in MS word if you type first letter as small it gets Caps.

You'll probably end up using event handlers to detect a change in the document's content, and auto format its text if necessary. But if never used event handlers, it's probably best to first learn the language basics.
^^^

Yes I started but what can I do in this project ? Can you recomend me some other project. I am not sure about this Word processor application TBH

Quote:Original post by agisler
Quote:Original post by braindigitalis
Well, this sounds like a fun game you are making. :-)

That aside, what have you tried so far, what have you read and researched, have you attempted to search google?
To assist you, we need to know exactly where you are stuck not just 'how do i do my project'.


I also agree with braindigitalis. Saying that, I don't know how I would create that application myself, especially since I do not know what your lectures are specifically looking for. However I would start by creating a windows form application project. Make sure you select the one under C#. This will at least allow you to add text boxes and etc. I do not know much of anything about application development so I could be wrong.



You are right we have to select windows application. This project is boring a 2D game in C++ would have been intresting. But I have no other option for this subject.

Other options he suggested were level editor for some games or image editor, which is more complicated. The worst part is the full evaluation is going to be this course work [dead]
This site shows how difficult a simple Notepad-style text editor with syntax highlighting in C++ is. I don't want to discourage you, but a full-blown Word-like program seems incredibly infeasible for someone who appears to not even know the language they are to write the program in. Does it have to be a complete Word clone, or will a simple text editor suffice?
Quote:Original post by webwraith
This site shows how difficult a simple Notepad-style text editor with syntax highlighting in C++ is. I don't want to discourage you, but a full-blown Word-like program seems incredibly infeasible for someone who appears to not even know the language they are to write the program in. Does it have to be a complete Word clone, or will a simple text editor suffice?


Thanks for the link. This notepad style text editor looks really complicated. I think something like this will be more than enough.

Does anyone know how I can get this linker error working in VS 2010. I tam not sure what to do:

error LNK2019: unresolved external symbol _CreateTextView referenced in function _WndProc@16	error LNK2019: unresolved external symbol _InitTextView referenced in function _WinMain@16	error LNK1120: 2 unresolved externals	


I get this error compiling the first program of the tutorial.
http://www.catch22.net/tuts/neatpad/1
Hold on there for a moment. Let me suggest a few things.

Making a Notpad editor with some simple formatting functions in C# is actually quite easy. First of all, I suggest you try to follow this tutorial.
There is others too, like
clicky
clicky

Completeing that tutorial shouldn't take long.

Once you have that up and running you will have a RichTextBox control. Click this control to select it and go to the properties window (If this windows doesn't show, choose "View -> Properties window" in main menu).
In the properties window there will be a toolbar button called "events". Click this. Now you should see a list of all available event handlers for the richtextbox control.
Now you have a few options (TextChanged, KeyPress).
If we go with the TextChanged event, double click on the empty field to the right of the event name to have the code for the event generated.
Inside this event you can iterate through the entire RichTextBox.Text value character by character (Maybe not the most efficient way but it should work).

Now, if you find a . character, set a flag indicating that the next character should be made uppercase if it is a lowercase (a -> z).

example:
foreach(char c in textbox.Text){  if(c == '.')    makeNextCharNotWhitespaceUppercase = true;  ...}


[Edited by - pulpfist on October 17, 2010 7:56:43 PM]
I would start by creating a list of features you want to implement in priority order, and then working through them one by one. It sounds like you can't see the trees for the forest.

"How do I create a word processor?" is a basically worthless question.

"How do I ensure the first character of a new sentence in a RichTextBox control is a capital letter using VC#?" is much more useful.

This topic is closed to new replies.

Advertisement