|
Smitha Vijayan wrote:
If I am right, I will have to parse the RTF and get this information.
Parsing the RTF is one way (and definately the fastest way), another would be to use the SelectionStart, SelectionLength and Selected* properties to advance through every character and pull the information you need.
For parsing information, http://www.wotsit.org/search.asp?page=3&s=text[^] there are 3 different standards listed there. I'm not sure which version the RichTextBox creates, but at the most you should only have to worry about parsing what your RichTextBox can produce.
[edit]A quick warning, the 2002 version is 225 pages long [/edit]
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
Thanks James. I think I will go for the second one. RTF parsing sounds like a huge task
James T. Johnson wrote:
A quick warning, the 2002 version is 225 pages long
Yup, I saw that
Smitha
It is better to be hated for what you are than to be loved for what you are not.
-- Andre Gide
|
|
|
|
|
Hello,
Is there a namespace/component/api that can allow me to
retrieve the url of all Web Browsers are currently loaded
on a machine ?
I have looked a Sysem.Web Sysstem.Net but can't find
anything... pls help
Thanks,
Ferdeen
|
|
|
|
|
Hi,
I want to add some custom buttons(such like fading, print, etc.) in the title bar, left to minimize button. Is that possible in C#?
Thank you,
weixiang
|
|
|
|
|
Does anyone know of any way to insert a tabpage into a tabcontrol? I don't want to tack the page onto the end with Add() I want to be able to insert it at any position. Anyone know of a way to do this?
Thanks in advance.
- monrobot13
|
|
|
|
|
I don't know of a way to do it directly, but it's fairly easy to do by shuffling the tab pages around. For example:
private static void AddTabPageAtIndex(TabControl tc, TabPage tp, int index) {<br />
if (index < 0)<br />
index = 0;<br />
else if (index > tc.TabCount)<br />
index = tc.TabCount;<br />
<br />
tc.TabPages.Add(new TabPage());<br />
<br />
for (int i = tc.TabCount-1; i > index ; --i)<br />
tc.TabPages[i] = tc.TabPages[i-1];<br />
<br />
tc.TabPages[index] = tp;<br />
}
Chris Jobson
|
|
|
|
|
Thanks for the info Chris. It's a big help.
- monrobot13
|
|
|
|
|
Assume that i am having a scenario where there are 2 servers that have been developed by different people & now I want to write a client that references both of these server objects using remoting. How do I add a reference to the server object that is residing on another server. How should the server admin make his object available to me? Will adding a web reference help? If so, where should the server object be available?
hoping for a reply...
anto
|
|
|
|
|
|
What do i need to do to create an object that will do remoting for me. From a system, I want to run an application that will create some objects & each of that objects will carry out remoting on a specific server each.
hoping for a reply..
novice.NET
|
|
|
|
|
Check out this link, it gives several example of remoting.
http://samples.gotdotnet.com/quickstart/howto/doc/remoting/mainfeatures.aspx
|
|
|
|
|
How do I convert a Colour into CMYK? (Or get the CMYK values from it)
(I need to get the CMYK values of each pixel in a picture in an Image class)
|
|
|
|
|
I am not aware of offline converters, but you could filter GDI+ channels out using System.Drawing.Imaging.SetOutputChannel method, based on the ColorChannelFlag enumeration. More info here[^].
|
|
|
|
|
Yes, I noticed that page while digging through MSDN, but I don't understand where/how do I use the SetOutputChannel function...
|
|
|
|
|
As said in the docs, "Sets the output color channels, as specified by the ColorChannelFlag enumeration, for all the pertinent GDI+ objects, such as Bitmap, Brush, Pen, and so on". Once the output channel is set, the code for drawing is the same, but the output is filtered.
|
|
|
|
|
Y..es... I understood that much.
But I need to input, not output... I need to get the colours, not set them...
Anyway, I got an algorithm to use for RGB to CMYK conversion. I was hoping to find some built-in stuff, but I guess it'll do
|
|
|
|
|
I have a tuff question, and ill give anyone my first born child for an answer. Im reading a comma delimited text file. So i have strings that I read in that look like this, "test", "test2", "test3", well here is my problem. The file gets screwed up from time to time and throws in extra quotes whereever it wants. So I often get this ""test, """"test2"", .
Im using the split function with a string array to split the line when i read it in, but i need to know how to remove those damn quotes from the strings. I have tried using the trim function and the replace function to no avail. Any help would be greatly appreciated.
Thanks,
Ryan
|
|
|
|
|
Instead of trimming, I would try to find why the extra quotes get in the file. How do you produce the file, how do you read it? Do you have code samples to show?
|
|
|
|
|
Well that is part of the problem. This is an add on to an already released product, and they have no intention of fixing the issue with the current product, some Im stuck with what it gives me.
|
|
|
|
|
Maybe I'm missing something, but do you need the quotes at all (i.e. do any of the strings contain embedded commas)? If not then why not remove all the quotes first (using Replace), then use Split to break up the line on the commas?
If the strings can contain embedded commas then it's harder. You say that it "throws in extra quotes whenever it wants", but then in your example its actually omitted a quote as well (between 'test' and the comma immediately after it). Does this really happen or was this an error in the example? Also, can it really add extra quotes "anywhere" (including in the middle of the text strings), or does it simply replace one quote by one or more quotes? Knowing the exact nature of the problem would help in trying to find a solution.
Chris Jobson
|
|
|
|
|
I want to remove all of the quotes, thats my goal. I have also tried using the replace function with both character and string overloads, but it doesnt seem to work, Im fairly new to c# so I apoligize for any newbie questions in advance. I was attempting to do something similar to this, string.replace(", null) or string.replace(char [] {'"'}, null), and I had no luck. If someone could give me directions on how to remove quotes or tick marks from a string my problem would be solved. Thanks for your patience.
Ryan
|
|
|
|
|
String.Replace("\"", null);
|
|
|
|
|
s.Replace("\"", "")
will remove all the double-quote characters in s.
Chris Jobson
|
|
|
|
|
String.Replace("\"", null);
|
|
|
|
|