Is this code in a Form to handle the various inputs? If so, set Form.KeyPreview to true. Since child controls will have the focus, the parent Form will not receive key notification messages unless KeyPreview is true.
I'm not sure why the toolbar would change things, but I'm guess that internally (the native Toolbar common control) is that it routes messages to the parent, perhaps causing other child controls to do it, too. Not sure, though.
Thanks for the reply - I was beginning to wonder if anyone would answer my plea!
That property is already set, I too am unsure why the addition of the toolbar would change things. With this in mind I returned to a previous version of the code before the toolbar was added, the mear addition of the toolbar without adding buttons or changing settings resulted in the same behaviour.
I may have to replace the toolbar with a groupbox and ordinary buttons ;-(
That might be a little too low level for C# to handle easily. In the Windows DDK there are a set of parallel port functions you can try to hook into (like IOCTL_INTERNAL_GET_PARALLEL_PORT_INFO) but I don't think any of them have been exposed in C#. And that assumes that you are using a parallel port printer.
If you are doing lower level OS I/O, C# tends to be a poor choice to use. The abstraction layer PrintDocument is there to avoid the messy OS level details of talking to the hardware. Why are you interested in the hardware communication?
Am interested because am writting a printer monitoring program that will monitor the printerout from any printer.where am having problem is getting the actual number of pages printed and also to be able to know when a page is printed in a situation where there is more than one page of the document.
I have written my first .NET app (yes, I'm a .NET newbie) very simple app just testing out some of the form functionality. Everything works well on my machine but when I copy it to our network and execute it from there I get
a System.Security.SecurityException thrown (Additional Information: "Request Failed") when creating the main form, Form1.
I know this is probably something simple but would really appreciate the help. I haven't done anything related to security yet (at least not that I know of!) so I would have thought that security wasn't an issue
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?