|
Hi,
I need to convert the richtext box contents into csv format and then write it into a file.
Currently I am reading the richtextbox contents(text), line by line in a for loop and then replacing the whitespace character with a separator(",") and then write it into a file using file.write() method. This process is taking a huge time.
Can anybody suggest a method which will take less time.
Thanks,
Virendra
|
|
|
|
|
You could try doing the substitution in one go. Also, posting the relevant snippet will help people find bottlenecks.
Cheers,
Vikram. Current activities:
Films: The classic Pink Panther series
TV series: Friends, season 3
Books: Liar's Poker, by Michael Lewis. Carpe Diem.
|
|
|
|
|
Does anyone know whether this is possible? I've read various articles and some which use LoadLibrary explicitly at runtime rather than using the DllImport attribute. Perhaps it's possible to use LoadLibrary16 to do the same for a 16 bit windows DLL
Matt Adamson
|
|
|
|
|
I'd be greatly surprised.. Mixing bitness and calling convention? Not likely. But who knows..
|
|
|
|
|
we know that when a web page is opened, the data comes packet by packet as it displays same on browser (IE).
How to make browser's document not to visible until it (the web page data) fully gets loaded into the browser?
What can I do using c#?
Give some examples for approaching this.
I had searching for this but unable to get?
|
|
|
|
|
I have created CR File(.rpt) in CR 2008 (Version 12.0). I added flash file into newly created CR file. Now I want to integrate this CR file into Visual Studio 2008 (Windows Form) application. How can I do this? Please, reply if anybody know it.
Thanks in advance.
|
|
|
|
|
you have to add crviwer component in your project
(versiyon 12)
if you find crviewer 12 please send me
|
|
|
|
|
Hi mates,
Can anyone tell me which is "best" book that talks about building component based application in C# (.Net) (like Visual Studio ex.)?
Regards!
|
|
|
|
|
"The best"? That's a title that no book can claim, since we can't measure "goodness".
A good introduction would be "Head First C#". It starts at the beginning, explaining the fundamentals first, moving on to interfaces, exception handling and more. It's used in the Dutch classrooms teaching C#, and the sounds that I'm hearing are quite positive.
ISBN 978-0-596-51482-2
I are troll
|
|
|
|
|
I don't know about best, but try
Component-Based Development with Visual C# by Ted Faison.
ISBN - 0-7645-4914-6
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
The "best" book is the one the YOU can understand and use. Not the one someone else can understand.
|
|
|
|
|
I am asking for a title sir?
|
|
|
|
|
Start checking out some books and see which ones you can understand.
|
|
|
|
|
hi
I want to get inner text from the xml node. and i am using
document.getElementsByTagName("AB");
Is there a better way to catch following:
document.getElementsByTagName("AB");
document.getElementsByTagName("ab");
document.getElementsByTagName("Ab");
in a single statement
Thanks in advance
|
|
|
|
|
document.getElementByTagName("ab".toLowerCase());
document.getElementByTagName("Ab".toLowerCase());
document.getElementByTagName("AB".toLowerCase());
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Thanks for the reply
but what to do if xml node is <Ab>some text</Ab>
in this case
document.getElementByTagName("ab".toLowerCase());
document.getElementByTagName("Ab".toLowerCase());
document.getElementByTagName("AB".toLowerCase());
will not work
|
|
|
|
|
Something is wrong here - XML tags are by definition case-sensitive, so a Rose tag in XML is different from a ROSE tag.
If for some odd reason you want to remove the case-sensitivity and you can't find any framework methods to do this, you can use XSL to transform all ROSEs to Roses before you manipulate it.
Cheers,
Vikram. Current activities:
Films: The classic Pink Panther series
TV series: Friends, season 3
Books: Liar's Poker, by Michael Lewis. Carpe Diem.
|
|
|
|
|
Can u give a example or link to implement this?
Thanks
|
|
|
|
|
There are tons of articles that show you how to use XSLT. Google is your friend.
Cheers,
Vikram. Current activities:
Films: The classic Pink Panther series
TV series: Friends, season 3
Books: Liar's Poker, by Michael Lewis. Carpe Diem.
|
|
|
|
|
hi,
I'm using this code to create a new directory into the solution during runtime
string targetPath = @"SampleDirectory"; \\directory name without any path to be copied in the solution
Directory.CreateDirectory(targetPath);
this code is working very well & creates the directory into the solution, but the problem arouses whenever I'm using an open file dialogue before this code, in this case the directory is created into the path specified by the open file dialogue not the solution path.
what can I do?
|
|
|
|
|
Hi,
You can maintain your solution path in a configuration file, namely App.Config.. Have a class that reads the xml file and get the path assigned to a property.. U can then use this property in your code wherever you wish to use the solution's path...
Hope this helps...
|
|
|
|
|
Environment.CurrentDirectory[^] perhaps?
Cheers,
Vikram. Current activities:
Films: The classic Pink Panther series
TV series: Friends, season 3
Books: Liar's Poker, by Michael Lewis. Carpe Diem.
|
|
|
|
|
Your code is assuming that the Current Directory is your "solution" path. This is not that case and you should NOT be relying on it. ALWAYS build a fully qualified path to the target folder/file you want when doing file I/O operations.
In your case, I'm assuming you want the new folder to be created in the same folder as your .EXE file. To get the full path to that folder, you can use Application.StartupPath . Then you can use Path.Combine(...) with that path and your new folder name to create the fully qualified path to this new folder and pass that to CreateDirectory.
|
|
|
|
|
thanks a lot, I used the Application.StartupPath and Path.Combine() and it's working very well.
|
|
|
|
|
Hi,
I was just trying to do some coding on highlighting a portion of text in Powerpoint so that I could insert a hyperlink to it. I could achieve it without any difficulty in Powerpoint 2003 and to my surprise, it did not work in Powerpoint 2007... The code that i used is as follows :
((PowerPoint.Application)applicationObject).ActiveWindow.Selection.TextRange.Text = "PPT";
((PowerPoint.Application)applicationObject).ActiveWindow.Selection.TextRange.Select();
((PowerPoint.Application)applicationObject).ActiveWindow.Selection.TextRange.ActionSettings[Microsoft.Office.Interop.PowerPoint.PpMouseActivation.ppMouseClick].Hyperlink.Address = "http://www.google.com";
((PowerPoint.Application)applicationObject).ActiveWindow.Selection.Unselect();
Can anyone tell me what could have gone wrong in the above code?
modified on Monday, May 11, 2009 7:10 AM
|
|
|
|