Use <br />. And to be fair (since I'm on the NDoc team), any XML parser canonicalizes text based on the canonicalization method used by the parser. All parsers of which I'm aware treat line breaks as spaces between matching tags and ignore them (depending on the whitespace settings) between adjacent tags. It's not NDoc that's ignoring them, it's the XML parser we use (which is, of course, the parser in the System.Xml.dll assembly).
Actually I want in my application that when a user presses right click on the button than a popup menu will open with different options. How can i develop this popup menu.
If there are any articles regarding this also write them in the answer
Thanx in advance
The problem is that using the WebRequest class to access this file, the Server I want to connect to doesn't search cookies on my computer, and so doesn't recognize me as a member.
See the HttpWebRequest.CookieContainer property documentation in the .NET Framework SDK. Provide a CookieContainer to store cookies.
Also, a server does not search your cookie collection. That would be extremely dangerous (although there are security holes in implementations some times that allow servers to request a different cookie)! The browser sends cookies for the server and path relative to the request.
You'll have to devise a way to get the cookie and put it in the CookieContainer, though. The HttpWebRequest.Credentials property may help as well since you require authentication, those forms authentication makes implementations like this difficult.
I'm trying to set the initial directory of the OpenFileDialog to the "My Documents" directory - is there a simple way to achieve this? Is there a system variable like %SYSTEMROOT% which allows you to set the initial directory to the windows install directory?
I was looking for the path to the "My Documents" folder but thanks for pointing the Environment class out! I didn't even know that it exists, and Environment.GetFolderPath(Environment.SpecialFolder.Personal); does the job.
Maybe I don't understand what you're saying. You want a program that prints out all of the possible combinations of "a", "b", and "c", right? It seems as though you already know the answer. It appears that you already know the answer but just to make sure, you're talking about doing something like the following, right?
currently I am working on a mailapplication that checks my mail on different mailservers. Sometimes i want to view the contents of the message.
I am now currently using a Windows Form with a richtextbox. That richttextbox.Text is filled with a string which contains my message. Most messages are in HTML-format. So i get the HTML tags in the text. How do i prevent that? How can I convert that string to HTML and which component should I use to show the mail in stead of the richtextbox.
You should embed the WebBrowser control. That's what many of the HTML Email readers do, like Outlook, Outlook Express, and various other third-party email readers. Customize your Toolbox in VS.NET and find the Microsoft Web Browser Control (shdocvw.dll). Add that to your toolbox and drag it on your form. You can then use various methods to display the HTML content, such as saving it to a file and using WebBrowser.Navigate2, or referencing the Microsoft.mshtml.dll assembly and either setting the HTML to the body.innerHtml, or use the UCOMIPersistFile class in the .NET base class library to cast the WebBrowser.Document to the interface and then use the Load method to load the HTML file that represents the body of your email message.
There is no build-in support for this in the .NET base class library (BCL). This actually requires a lot of COM and native functions. Your best bet is to consult the Windows Driver Development Kit (DDK). Essentially, each device class has an associated CLSID for the property pages it supports. The client application creates a property sheet, adds-in default property pages for all devices, and queries the device class for additional property pages to include, similar to how shell property page extensions work, except in that case default property pages are added and the file's associated property sheet handlers are queried.
The Platform SDK does contain some information about this, but the DDK will provide much more specific information about device property sheets.
To achive this I used the Project/Add Reference... menu and browsed for the Component in the COM Tab.
There are no problems on viewing the component in the Object Browser or to instance any class of the component. But if I try to call a method or set any property of any instanced class I get the following error:
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in mscorlib.dll
Additional information: Catastrophic failure
Could be many things. If you're not running the application on the same machine, make sure the target machine has the OCX and any of its dependencies installed (making sure that its dependencies are installed is required on the development machine as well). The threading model of the COM control might be a factory, too, but since the extension is OCX I'm guessing you used VB to create it and could never stomach getting deep enough into it many years ago to know if you can control the thread model.
To better assist you, could you perhaps post a short code snippet of how you're instantiating the control and calling the method?
Also, the object browser only views Type information. If you want to test the initialization of the control without factoring in your code (not saying that you did something wrong, but you must eliminate that possibility first), use the ActiveX Control Test Container, which should be in your tools menu. Add an instance of the control and try running a few methods on it to make sure that it's working correctly.
It doesn't really matter in what language a COM component was written, so long as the runtime for the language exists on the target machine, so it wouldn't be a problem if it was written in MFC (in fact, most components are written in C++, of which MFC is just a wrapper).
Take a look at tlbimp.exe in the .NET Framework SDK. It imports a typelib to an interop assembly (Runtime Callable Wrapper, or RCW). Perhaps by manually creating this assembly you can set some additional options. If this is an ActiveX control, you can also use aximp.exe to not only generate an RCW but also the source that would be compiled. I'm wondering if that string parameter (judging by your Hungarian notation) isn't being marshaled correctly. Remember that strings can be either ASCII or Unicode, and that Windows only natively supports ASCII (as opposed to Windows NT, which uses Unicode but can use ASCII). You can control how the string should be marshaled using the MarshalAsAttribute (see docs for details). If the MFC COM component only handles ASCII or Unicode, you should use UnmanagedType.LPStr or UnmanagedType.LPWStr respectively. If the guy built two COM components for Windows and Windows NT and they both support native strings, then you can use UnmanagedType.LPTStr.
The only other thing I can think of is the threading model (a factory merely creates components). Is this single-, apartment-, or free-threaded (or both latter models)?