|
check the following CodeProject article[^]
"Don't worry if it doesn't work right. If everything did, you'd be out of a job." (Mosher's Law of Software Engineering)
|
|
|
|
|
Hi all,
I have to find out the spelling mistakes from the words which is typing by user in rich text box.if spelling is wrong i need to mark that word with red under line.how can i do that? Can any one help me plse........??
Thanks in advance.
Regards
Lijo
|
|
|
|
|
Look into the WPF rich text box, that has an option to set spellCheck to true or false. that can handle the red line and suggestions for you.
If you doing windows forms, you may want to use an elementhost control to put the WPF richtextbox in.
I made a small customControl which had an elementHost that set a WPF RichTextBox up inside it
|
|
|
|
|
i am using .net 2.0 then how can i use WPF? can u plse tell me how to do it in .net 2.0?
|
|
|
|
|
Im a bit busy at the min to go into depth, will post more detail in bout 1.5 hours, so hope you can wait
|
|
|
|
|
Sure i can wait for u......
|
|
|
|
|
OK so you need atleast 3.0 for what I suggested. I dont know for sure but can you not just include the relevant 3.0 library files with your application and reference them?
Also its not unrealistic to expect users to upgrade there .Net version to meet application requirements.
Anyway if your sticking with 2.0 then there was an alternative solution I tried before using the WPF approach. That was to have a text file with all dictionary words:
I cant remember which one i used but here is one example:
Dictionary Words[^]
Im sure you can see where this is going now -
Create function that tests all words in the richTextBox with the .txt file and then highlight any words that dont match, i set the text color to red as there no option for the red underline. I think you would have to handle the paint for that, which is prob more hassle then its worth.
Also I choose to have a button to perform the spell check rather than auto check when text changes because of the performance. Of course one could make my attemp more effecient im sure, I didnt bother as I found the alternative WPF approach instead.
I didnt handle the spelling suggestions as the algorithms seemed a bit complex but there were some good explainations for how to do it out there
Hope this helps in anyway
My opinion is... If someone has already posted an answer, dont post the SAME answer
|
|
|
|
|
You can use .NET 3.0 in VS2005, otherwise you can't. The other option for spell check is to interfaec with Word, of course then your users need to have Word.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
There are several SpellChecking libraries available you can use to check what the user types.
|
|
|
|
|
Hi guys.
I'm going crazy from searching the Internet for solutions.
how do i extract the domain from a URL or Uri
the host name (Uri.Host ) is not good enough since i want to remove all sub-domains.
i found a few regex solutions but all are for single top level domains like .com, .org and .net but i need a solutions for co.uk and all domain types.
I'm creating a app that allows browsing for certain domains that the user could choose, the user could add "*.google.co.uk" to allow all sub-domains of google.co.uk but i can't compare "search.something.google.co.uk" to match "*.google.co.uk" since i can't extract the domain only.
Please if any one knows a solutions for this, or how to compare a host to a wildcard domain please reply.
Thanks
|
|
|
|
|
IM not sure how the Uri.Host string displays or the different types of addresses you could get, so i cant suggest a methofd for parsing.
But you could split the string with '.' and then loop the results for a match to pre-defined values. i.e. if one value is 'Google' then its a google website etc. Again im not sure how reliable this would be but it could be a temp solution till you find a better way
|
|
|
|
|
|
OK then:
make a list of all '.com' '.co.uk' (whatever you call them) in the world.
then search your uri for a match and the domain should be the split before the '.com' etc
Thats a solution, right?
|
|
|
|
|
|
|
This isn't hard at all...
string url = "http://abc.com/default.aspx";
string[] parts = url.Split("//");
string[] parts2 = parts[1].Split("/");
string domain = parts2[0];
If you need to further parse this, just do domain.Split('.'); and take the first two array items, and you get the root domain. All you have to do is *think*.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Getting the domain name from the host name is easy. It's just the two last keywords separated by a period. Except for the .co.uk domains of course... (Are there any other weird domains like this in the system?)
Why not create a regular expression from the wildcard string by replacing * with .+? and encoding the rest? That would even give greater flexibility, as the user could search for something like "www.*.google.com".
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
that is the answer i was looking for
thanks
|
|
|
|
|
I found this[^] useful as a starting point when thinking about this type of thing.
Hope it is useful.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
|
|
|
|
|
haiii
I created a webservice.But i want to create a sample APP to check my webservice....
Anyone help me in the code...hw to call a web method in a web form ?
i tried smethng bt..showing the error: No overload for method 'AddValue' takes '0' arguments....
thnks in advance.....
|
|
|
|
|
remyajith wrote: i tried smethng bt..showing the error: No overload for method 'AddValue' takes '0' arguments....
Well, we have four issues
1 - you can't work out how to use the asp.net forum
2 - you don't know how webservices work ( they generate their own test pages )
3 - you can't read error messages or use intellisense
4 - you think we can fix your buggy code despite the fact that you didn't post it.
It all looks beyond redemption to me.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Anyway thnks 4 ur g8 reply........
|
|
|
|
|
txt speak only makes you look more stupid.
If you want help, try reading the forum rules, posting in the right forum, perhaps even googling for information or doing some basic reading on the technologies you are using. Did you even notice that I told you the answer ? If you browse to your web service, it will return test pages so you can execute the web methods via a URL.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Your problem is that the method 'AddValue' does not take zero arguments. This is stated quite clearly in the error message you are receiving. Take a look at the AddValue method in your code or the documentation for it (if you didn't make it) and see what arguments it takes. Then double-click the error to find the line that is causing the error and make sure your call to AddValue is supplying all of the correct arguments.
Next time, as the other guy said, post in the right forum and clean up your grammar and you might get help faster.
Steve
|
|
|
|
|
Hello everybody
How to change a size of box on checkBox control?
thanks in advance
|
|
|
|