I had a look for one initially but didn't find anything. Having had another look I can see Control.DrawToBitmap, perhaps I should have looked harder the first time! Thanks for your advice. Steve
Steve_
Posts
-
Best way to get an image of a Form -
Executing Java Object in C#PS. I just had a closer look at your commands. You are setting the command to call the Java virtual machine (Java.exe) which is fine. But you are then setting the first argument (in your cmdParams) to "java" then "-xms32m...etc". Did you mean to put jar instead of java? When you execute a JAR file on the command line it should be something like "C:\whatever\Java.exe -jar MyJar.jar". Take a look at the documentation for the Java Virtual Machine when running JAR files. Steve
-
Executing Java Object in C#Hi, Have you tried running the command you are attempting to run in the command line first to make sure that the command actually works? What you are getting is an error from Java that says it cannot find a certain class. This is almost always a problem with the classpath argument of the command. Try debugging the command in cmd.exe first and then once you are sure the command works, try doing it in code. Steve
-
Best way to get an image of a FormHi, I would like to be able to capture an image of an arbitrary window (though it is most likey that it will be a window I create). What is the best way to do this? I am currently using the Graphics.CopyFromScreen method to paint the section of the screen the window occupies to a bitmap but this has the obvious disadvantage that if the window is behind another, the image will also capture this overlap. Is there any other way of doing this that would solve this problem? Thanks, Steve
-
Document editor add-inHi, I would like to develop a VS 2005 Add-in that provides a new document editor for a custom file type of mine. Could someone point me at some documentation or a tutorial that would help me to achieve this because I am currently having difficulty finding any. Thanks, Steve
-
ISO file.... help needed immediately!Of course we should discourage it, but we should do so in a professional manner. I felt that your comments were a little unfair since you don't really know the full story behind why he has an ISO. There are quite a lot of people at my university who use the MSDNAA ISO files so they can work at home. You would be quite suprised how clueless some people are when it comes to computers and yet are taking a computer course. The tech department gives instructions on what to do, but people are people and just don't read half of the time.
-
ISO file.... help needed immediately!This VS2008 ISO wouldn't be a pirate, would it? If so, remember you gave your email when you registered here? No so clever, was it? I'm sorry but you are behaving a bit judge jury and executioner here. You asked him if it was pirate when you had clearly already made your mind with your "no so clever" comment. If you had any clue, you would realise that ISO is a very common method of distributing software to many people such as: An MSDN subscription for a company. Or more likely and as in my case via the MSDN Academic Alliance that provides free VS and other things to students who's universities are part of it in ISO format. And besides, what do you really think is going to happen even if it was pirate, Microsoft is clearly going to file a lawsuit against one guy on one of the millions of forums out there on the premise that his e-mail address was not generated by 10 minute mail or just created as a false one? Perhaps think next time before you start accusing people without knowing really what the situation is.
-
Write image as Indexed PNG C#For anyone else who wants to achieve this, the FreeImage project provides support for a large number of image codecs and colour modes and has bindings for C#. It is what I used to create a PNG8 file. Steve
-
Write image as Indexed PNG C#Hi, I have an instance of Bitmap that I want to save as an PNG with Indexed colour mode. How can I do this in .NET? Thanks, Steve
-
Nearest point on a line.Hi, I have a (straight) line between two Point's. I want to find the nearest point on that line to another arbitrary point. How can I do this? Thanks, Steve
-
I thought I couldn't shadow...In my experience, probably not long, then again, perhaps I am just always wrong :D.
-
I thought I couldn't shadow...However, this will not compile:
private static void doSomething()
{
int number = 5;if (true) { int number = 6; }
}
-
Printing using GDIThat is not quite what we were looking for because we are using pure Win32, no MFC. However it did lead me to find this so for that you have my thanks. I spent ages looking on the MSDN site for something like that. Steve
-
Printing using GDIHello, We would like to print some simple drawing output using GDI. We have used the PrintDlgEx function to obtain a device context handle to a printer, but are unsure of how to proceed. We have not been able to find much example code and are a little stuck. Basically, we have the DC handle. Presumably we then call Rectangle(x,x,x,x) etc to do the painting. What must be done then to initiate the actual printing? Any help would be appreciated. Thanks, Steve
-
Flash in Windows Forms -
chech boxDo you want to change the size of just the check box control? CheckBoxs have (I think) the AutoSize property set to true. This will mean you cannot actually resize it in the form designer. Set this to false in the property grid or in code and you should be able to resize it. However, this will not make the actual box change size, just the area the control covers and the text will change position. If you want to actually make the box bigger, you will have to do as the other poster said and draw the box yourself.
-
how to call a web method in a web form application??Your problem is that the method 'AddValue' does not take zero arguments. This is stated quite clearly in the error message you are receiving. Take a look at the AddValue method in your code or the documentation for it (if you didn't make it) and see what arguments it takes. Then double-click the error to find the line that is causing the error and make sure your call to AddValue is supplying all of the correct arguments. Next time, as the other guy said, post in the right forum and clean up your grammar and you might get help faster. Steve
-
extract domain from URL@musefan .com etc are known as top-level domains.
-
Painting with win32.I don't have an instance of a control. All I want to do, is call some routine that will paint me a button to a specified DC, like the ButtonRenderer.DrawButton method for the .NET framework. This allows you to pass an arbitrary Graphics object and some state information and it will draw a button using windows styles to it without needing an instance of Button.
-
Painting with win32.Hi, Are there functions available in the windows api that will paint windows controls to a certain rectangle using GDI. Something similar to the ControlPaint class in .NET. If there are, can someone point me to the documentation that details how to use them. Thanks Steve