This is not necessarily the best idea. You're saying that you fully trust ANY code running from the Intranet zone. If you're so sure, you could do this, but a better way is to right-click on either All_Code under the machine policy, or the Intranet_Zone and add a new Url membership using the server name and directory like so: file://SERVERNAME/Directory/* (you can use more directories if you like). If you did this with the Internet_Zone code group, you're opening your machine up for any kind of .NET attack possible. The Intranet_Zone could contain code just as harmful, either intentionally or unintentionally.
You'd be better off managing separate code groups for your applications and leaving the default permissions.
Quick Question: How can I rotate an image using GDI?
Extended Question: I am playing around with an application that is a very quick and dirty fax viewer, the user loads an image into a picture box and from there can apply various transforms on it to make the fax more legible.
When the user selects a transform, I retrieve the image object attached to the picture box and get the graphics object from that image, from there is all gets a bit fluffy, I have tried using
And also creating a matrix and transforming using that (as described in the MSDN), but none of these methods seem to work. After some trawling through CP I havent found anything that using rotational transformations (although the articles by Christian Graus in the C# GDI section are brilliant, the only thing he doesnt do is rotation)
post.mode = signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
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.