|
Hi,
i need a idea for following requierment.
how to spilit the following text and html tags.
\r\n</td></tr><td valign=top width=8%><p>1.</p></td>\r\n<td><p align=left>\r\n\r\n\r\n\r\nThe patient is with HIV infection, which is undetectable. However, her CD4 count has gone down. We will change the Trizivir to Aila to take one a day and we will see her in about four months.</p>\r\n\r\n\r\n\r\n\r\n \r\n\r\n\r\n\r\n"
My Requierment is:
the above text coming from database in view mode it will be like this
1.
The patient is with HIV infection, which is undetectable. However, her CD4 count has gone down. We will change the Trizivir to Aila to take one a day and we will see her in about four months
then it will go to edit mode in this i have to restrict the tags.and allow the text to edit
and the submit click agian i have to add the html tags to text for alignment
Thank in advance
Revathi Raj
|
|
|
|
|
Just parse out the stuff you need. You can use regular expressions or string functions. Also, do not use words like "Very urgent" around here. Most members do not have a liking for that since we are all volunteering our time without pay.
"Try asking what you want to know, rather than asking a question whose answer you know." - Christian Graus
|
|
|
|
|
Short answer: no.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Thank you
|
|
|
|
|
Please don't delete your questions once they have been answered.
That's considered quite rude because that way the answers become meaningless and other users searching the forums can't learn from your question.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
I wondered how this became headless. Didn't realize you could do that
|
|
|
|
|
Sorry Mate,
I will take care of it from the next time...
Thanks,
Kuldeep
|
|
|
|
|
give me sample codes in C# using the iterator
|
|
|
|
|
1) Look up the word "please" in your dictionary
2) Use the search function
3) Use meaningful headlines
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
|
Like mav.northwind said, say please, and also use google to search. If you have a question about iterators, ask. Don't just rudely demand sample code.
"Try asking what you want to know, rather than asking a question whose answer you know." - Christian Graus
|
|
|
|
|
I have a group box containing a rather complex grid of controls. When that group box resizes (as as a result of my form resizing), some rather complex and time consuming code runs to re-layout the controls.
Some of the more complex code can be skipped until after the user is done resizing the form - it is not necessary for this code to run while the user is still resizing, as he can still see where things will go.
How do I do this? Currently, I'm getting many many resize events as the user drags the edge of the form. How can I defer some of my actions until the resize is complete?
For instance, is there an event I can get once the resize is complete, that I *don't* get during the resize?
|
|
|
|
|
Hi!
You're asking for a way to decide whether or not the form is going to be resized in the near future (resizing still in progress) or not (resizing has finished). Time to polish your crystal ball
But you could use a timer to defer your code until resizing has stopped for a while. If another resize event occurs before the timer has fired, restart the timer. Once the timer fires, the last resize event lies a short while ago, so probably the user is done resizing - you can perform your layout.
Nevertheless, the user still can start resizing again while you're performing layout...
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
It's closer to "I want to know when the mouse comes up after resize", but without the complications of tracking the mouse, and the fact that resize can come from other sources than the mouse, etc.
I've seen the event structure I want in other places. Basically, I'd like a "Resize Just Completed" event, and perhaps "Mouse Resize Is Occuring, Mouse is Still Down, Here's Your New Dimensions" event to go along with that.
I believe that the reason they don't distinguish between them in .NET / Windows is so that legacy apps would redraw on the fly during a resize (since pre-Win95 windows only got the Resize event after the Resize was completed).
At any rate, I was hoping I was missing an easy method here, like a "Resize Completed" event, somewhere in all the Layout() hoopla. Having looked and tested, I don't think I can have what I want (without doing my own timer stuff, which is a nuisance and not worth it).
Thanks for the idea, though.
- The Lazy Coder
|
|
|
|
|
Although it's not directly exposed in the Form Properties window in VS 200x, if you look in MSDN you'll see that a form has multiple resizing events, exactly what you need:
Remarks
The ResizeBegin event is raised when the user begins to resize a form, typically by clicking and dragging one of the borders or the sizing grip located on the lower-right corner of the form. This action puts the form into a modal sizing loop until the resize operation is completed. Typically, the following set of events occurs during a resize operation:
1. A single ResizeBegin event occurs as the form enters resizing mode.
2. Zero or more pairs of Resize and SizeChanged events occur as the form's Size is modified.
3. A single ResizeEnd event occurs as the form exits resizing mode.
Note
Just clicking without dragging on a border or resizing grip will generate the ResizeBegin and ResizeEnd events without any intermediate Resize and SizeChanged event pairs.
The ResizeBegin and ResizeEnd pair of events is also raised when the user moves the form, typically by clicking and dragging on the caption bar. These events are not generated by programmatic manipulation of the form, for example by changing the Size or Location properties.
See for .Net 2.0: http://msdn2.microsoft.com/en-us/library/system.windows.forms.form.resizebegin(VS.80).aspx[^]
|
|
|
|
|
I need to execute my program, when i click the print button from any program (eg. MS word), I think it is not related to .NET, But if you have worked like that projects, please let me know.
Thank you.
Chatura Dilan
|
|
|
|
|
You want it to run whatever printer is used, or write a print driver.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hello,
I know this may sound crazy but I just wanted to know if anyone can help me.
I'm creating a front-end style database management system, there is also functionality in the program to use the data etc but thats not important. What im trying to achieve is the addition of fields to tables in a database which is relativly easy, but I also want my classes that represnt tables in my database to have updated getter and setter functions.
I dont know if this is possible so that when a new field is added, i can write some code that will alter whatever.cs and add in new functionality to handle the new field. Thinking about it, i dont think it's possible - the only way i can imagine it is to run some sort of script whilst the program is not running to update the code?
Any suggestions if any of that made sense?
|
|
|
|
|
admgamer wrote: Any suggestions if any of that made sense?
How about a hash table keyed on the column name that returns the value of the column rather than modifying getters and setters.
|
|
|
|
|
I have a method which places a control in the specified Form/Control. But I can't figure out the optimal signature.
void GetCustomControl(object FormOrControl, int Top, int Left)<br />
{<br />
<br />
<br />
<br />
}
I've specified FormOrControl as an object, but I would prefer if the caller handed me his Controls collection, so I can just add my control without having to look up the TypeOf object being handed to me.
How do I write the signature for that, and how do I do I reference it in the method?
I tried specifying CollectionBase, but that wasn't right.
|
|
|
|
|
JoeRip wrote: I've specified FormOrControl as an object, but I would prefer if the caller handed me his Controls collection
Then why not pass a ControlsCollection then?
|
|
|
|
|
[modifying my earlier happiness]
Won't work. When the caller passes in the Controls collection of a Control, this error is thrown:
Error 3 Argument '1': cannot convert from 'System.Windows.Forms.Control.ControlCollection' to 'System.Windows.Forms.Form.ControlCollection'
Looks like I'll just have to accept an Object FormOrControl, and check TypeOf before using Control.Add to add my control.
|
|
|
|
|
Just to clarify - my method wants to be able to place my custom control into a Form or Control's Controls Collection.
ControlCollection is specifically the ControlCollection of a form.
Here's the code I ended up using:
<br />
void GetCustomControl(object FormOrControl)<br />
{<br />
<br />
if (typeof(Form) == FormOrControl.GetType())<br />
{<br />
((Form)FormOrControl).Controls.Add(RBO_Panel);<br />
}<br />
else
{<br />
((Control)FormOrControl).Controls.Add(RBO_Panel);<br />
}<br />
}<br />
|
|
|
|
|
If you just want to uses the "collection" to add your control, you can do this: void GetCustomControl(ControlCollection controls, int top, int left) . Thus, you can use it thus: GetCustomControl(Form1.Controls, 0, 0); or
GetCustomControl(Button1.Controls, 0, 0);<br />
<br />
Also, <code>void GetCustomControl(Control control, int top, int left); should also work. Thus, you can do this: GetCustomControl(ListView1, 0, 0); . This should work since all controls inherit from "Control".
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
See my comments above. I need to accept either a Form or Control. So I can't use ControlCollection or Control.
I was being lazy, I'll just take the Object and cast it as necessary.
|
|
|
|