|
Have you looked in the debugger ? I think the rich text box is your problem.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
RichTextBox1.Text.Replace(@"/", @"//");
You're going to run into a problem each time you run this though. Every time you run this, or any other similar function, you'll end up doubling the number of slash marks EVERY time it's run. So...
/ This is a test...
will become
will become
will become
Unless you put in some code that checks for this condition...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I'm having horrible luck with this. i made a simple simple app with one regular textBox1, and a button. on the button's click I have this code:
textBox1.Text.Replace(@"/", @"//");
just like you showed me. it still won't work (I also tried it with the richTextBox, and still no luck. I'm so annoyed at this. It's plagueing me. any ideas? thanks
|
|
|
|
|
Try this
str="aa/aaa/aaa/"
str1=""
Iterate each character in str
{
if TheCharacter =="/"
str1+="/"
str1+=TheCharacter
}
<italic>Work hard, Work effectively and a bit of luck is the key to success.
|
|
|
|
|
Hi!
It's quite simple, strange that no-one noticed so far.
string.Replace(a,b) returns a new string holding the text after the replacement.
So if you simply write:
richTextBox1.Text = richTextBox1.Text.Replace("/","//"); you should be fine.
Regards,
mav
|
|
|
|
|
Smack! What a bad day yesterday...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
awesome!!! what a relief. thanks guys!
|
|
|
|
|
Based on some examples, I've successfully managed to retrieve the 32x32 version of a file icon by passing 0x0 into the uint uFlags parameter of SHGetFileInfo; however, I am unable to figure out how to retrieve the 48x48 version.
Let me know if there are any examples out there on this or if you have any suggestions.
Thanks!
|
|
|
|
|
|
Absolutely perfect! Well, I can throw away the code I had because this is exactly what I need. Although, I’m glad I struggled my way to get to this point as I picked up some really great experience along the way.
Anyways, thanks for your help. I owe you one!
Milan
|
|
|
|
|
Hi all,
I need some help to create technical indicator for the project. I have to read the file in csv and create same file after reading and calculating the values and some more with indicator and model. I need some little help for creating technical inidcator like SoctchRSI, RSI, EMA, MACD.
Thanks in advance.
|
|
|
|
|
I can't make heads or tails out of your question, but I reckon the easiest way to read a CSV is to read a line at a time, then to do a split on the ,. If you can break your request into plain English, I'd be happy to try and help some more.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
I'll just repeat what Christian said... HUH?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello all ,
i tried to use active x component in aspx page but i got this error.
System.Runtime.InteropServices.COMException: Catastrophic failure
please can any one help me.
Regards,
Hay
|
|
|
|
|
This is nowhere near enough information for us to help you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello Dave,
I use SIP Phone active X component on ASPX Page.but when i try to run the page i got this exception.
Catastrophic failure <br />
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. <br />
<br />
Exception Details: System.Runtime.InteropServices.COMException: Catastrophic failure
Regards,
Hay
|
|
|
|
|
Ok, I have an application that is sitting on a server and listning for requests using a Socket and on port 8221. Well this servers app's sole purpose is to take in what the user wants and run a query based on that incoming requests and parameters.
Ok, application seems to be working fine functionally except for a few issues that I am not having any luck trying to fingure out what to do:
1. I fixed memory leaks, the memory seems to be fairly constant between 6 and 25K. But the problem is that the handle count seems to be going up. For example I am looking at the taskman on the server, the mem is at 7568 and the handles are up to 2800+. How or any suggestions on reclaming these handles back or this is a non issue.
2. Second, since this is a communication app it is sitting on the server minding it's own business and all of a sudden sometimes i see it takes up 99% of the cpu WHILE IT HAS NO PENDING CONNECTIONS.
Any suggestions as to how I can address these issues.
BTW this is one of the best .net blogs i have ever read
http://blogs.msdn.com/ricom/archive/2004/12/10/279612.aspx[^
So, my thanks to this guy for learning and helping me track down my memory leaks.
|
|
|
|
|
Hi
How do I supress the redraw event until my resize is done, i.e. while resizeing a window?
/Johan
|
|
|
|
|
Suppress the redraw event on what? Some things need to be drawn for feedback purposes.
|
|
|
|
|
When press Ctrl+v in richtextbox, how to get the text which is pasted,
how can i do?
|
|
|
|
|
|
hii,
you can do so by using keyup event if the keys pressed were contol+v get the data in clibbord here is simple example
private void richTextBox1_KeyUp(object sender, System.Windows.Forms.KeyEventArgs e)
{
String PasteText="";
if(e.KeyData==(Keys.Control|Keys.V))
{
PasteText=(String)Clipboard.GetDataObject().GetData(typeof(String));
if(PasteText!=null)
MessageBox.Show(Clipboard.GetDataObject().GetData(typeof(String)).ToString());
}
}
|
|
|
|
|
there's a much easier way.
richTextBox1.Undo();
|
|
|
|
|
HI
My problem is that I am reading a image field from the database table .
then I need to Convert that image field value into a byte[] .
dread = sqlcomm.ExecuteReader();
sqlcomm = new SqlCommand("getCont1" ,sqlconn);
sqlcomm.CommandType = CommandType.StoredProcedure;
dread = sqlcomm.ExecuteReader();
while ( dread.Read())
{ temp= (dread.GetValue(0));
}
this "temp" var store the image field value as object .
now i need to convert this object into byte[] as i have to pass it to a function which take byte[] as parameter.
what I need to do ?
thanks
ss
thanks
|
|
|
|
|
An image SQL server column type translates to a byte array (byte[] )framework type. In your example, the 'temp' variable would have to be declared as byte[] .
You could also use the GetBytes(int index) method on your reader.
For a more complete type mapping table, look here[^].
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|