|
You can make a function that replaces all the ( < ) tags with (_&_l_t_;_)(<)
and the closing tag( > ) with (_&_g_t_;_). (>)
Note:
You must remove the underscore character (_) from all the codes.
|
|
|
|
|
If you need an HTML-Encoded string you can use the System.Web.HttpUtility.HtmlEncode function.
You must reference the System.Web assembly to use this function.
If you need to actually strip the Html tags you coud use a regular expression like this:
string cleanedText = System.Text.RegularExpressions.Regex.Replace(htmlString,@"(?:</?(br|p)[^>]*>)","\r\n");<br />
cleanedText = System.Text.RegularExpressions.Regex.Replace(cleanedText,@"(?:<[/!]?([A-Z][A-Z0-9]*)[^>]*>)","");
This code is very basic. It will not strip scripts nor will it handle tables pretty well.
I hope this is at least a start for you.
|
|
|
|
|
Is there a ActiveX of Autocad for C#.NET? Thank you.
|
|
|
|
|
If Autocad exposes a COM object, you can import it into C# and call it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
Read the docs ? Google ? Look for samples that came with it ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
There is CADIO (search for DXF on the site).
It is for unmanaged C++ so does not work directly in C#
|
|
|
|
|
AutoCAD 2005 and 2006 have managed assemblies you can use. Otherwise you can ActiveX interface that AutoCAD has supported since AutoCAD 2000.
--
Joel Lucsy
|
|
|
|
|
Thank you for u answer but please give me some example.
|
|
|
|
|
I might be able to, but you didn't say what version of AutoCAD you had, what approach you'd like to take, nor the scope of what you're trying to attempt.
--
Joel Lucsy
|
|
|
|
|
I have autocad 2006. I want to develop my application can view AutoCad File (DWG) with some feature like zoom-in zoom-out.
|
|
|
|
|
It sounds like you're trying to create a viewer external to AutoCAD. This isn't really possible without licensing specific things from AutoDesk.
--
Joel Lucsy
|
|
|
|
|
So I'm making an application that alters another Windows program. I want to do it buy synthesizing mouseclicks. I have that aspect working, what I need to do now is determine the location. I'm using GetWindowLocation, However the values it returns are kind of absurd. SO I'll post my code(stolen mostly from another post) and if anyone can figure out where I went wrong...
<br />
[DllImport("user32.dll")]<br />
private static extern bool GetWindowPlacement(IntPtr hWnd, ref WindowPlacement placement);<br />
public struct WindowPlacement{<br />
public uint length;<br />
public uint flags;<br />
public uint showCmd;<br />
public POINT ptMinPosition;<br />
public POINT ptMaxPosition;<br />
public RECT rcNormalPosition;<br />
}<br />
public struct POINT{<br />
public long x;<br />
public long y;<br />
}<br />
public struct RECT{<br />
public long left;<br />
public long top;<br />
public long right;<br />
public long buttom;<br />
}
That's my structure definitions.
I call it like this
<br />
WindowPlacement Place;<br />
GetWindowPlacement(Handle, ref Place);<br />
Ok so there it is, the values return seem pretty absurd. Negative numbers 15 digits long and such, nothing I can make a mousepointer move to without errors. Anyhelp would be great.
jake
|
|
|
|
|
In C++, a long and an int are both the same size. Change the longs to ints in POINT and RECT, and the rcNormalPosition will become valid and accurate, I've just tested it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hi
how i can make a stand alone c# windows application?
thanks
|
|
|
|
|
select the project type Windows Application in Visual Studio?
The only thing you need is the .NET framework
|
|
|
|
|
Hey guys;
I want to know how can I syntax colorize a textbox. Like puting a little squiggly MSword underline under a text or letter.
Any ideas please write.
Thanks
|
|
|
|
|
Two words - owner draw. You have to handle drawing something like that yourself, the textbox does not support it.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Please search a bit yourself before posting. Searching for 'syntax textbox' here on CodeProject gives you an article which is no two days old.
|
|
|
|
|
I think in a textbox you cant do that.
A RichTextBox much better basic for it.
I think you can start if you read the RichTextBoxExtended in docs.
But I remember somwhere I find a code shomething like yorur wish, if I find it, post it to you.
|
|
|
|
|
Does anyone have any references on how to find out the mail settings on a PC using C# ? The program I'm working on needs to send emails and I'm hoping that I can get the mail server details and reply address from outlook withouth the user having to enter them.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi Christain,
Can we look up the info in the windows registry? For example, in the key:
HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts\
or somewhere in the user profiles
|
|
|
|
|
Outlook is not set up on this PC, so I can't check, but I'll look into that tomorrow. A registry solution would suit me, I'm worried about trying to connect to different versions of outlook.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I need an application that keeps record of process starts and closes in several computers, more exactly, a windows service. This is for monitoring computer use at my university and make statistics on who uses more what programme and whatnot.
I'm not sure how to do it, but I'm guessing it's with WMI, maybe an event triggered? I don't know for sure.
I only need to know when a process was started/killed/closed and what process it was, I can do the other features (not listed here) myself.
If someone can just give me a hint or anything it'd be great
Thank you very much
|
|
|
|
|