|
Not by you, apparently....
Seriously, is google broken where you live ? Can you not read ? What I told you, IS the answer.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
lnmca wrote: Is it not possible to pick the data from database and show it in the property as in dropdownlist?
Yes.
My failometer is detecting vast quantities of FAIL!
"Its SQL - hardly programming..." (Caslen)
|
|
|
|
|
Hi,
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
|
|
|
|
|
I believe the control themselves have a rendertobitmap method that you can call, which I assume triggers a paint event but renders to a bitmap, not the screen.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
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
|
|
|
|
|
*grin* glad to help
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
I have this task, i need to call a Java Application using a web-service call.I need to know if someone has a clue on how to do that,so far this is my attempt.
string cmd ="C:\Program Files\Java\jre1.6.0\bin\Java.exe";
string cmdParams="java -Xms32m -Xmx1g -Djava.library.path=d:\cep\col\sql -classpath d:\cep\col\commons-net-1.4.1.jar;d:\cep\col\commons-codec-1.3.jar;d:\cep\col\sql\sqljdbc.jar;d:\cep\col\DialogInput.jar za.co.lightWave.control.DialogInputControl";
using (Process process = Process.Start(new ProcessStartInfo(cmd, cmdParams)))
{
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.RedirectStandardError= true;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardOutput = true;
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process.Start();
process.WaitForExit(timeout);
return process.ExitCode;
}
I need to know what is an effective way of executing that command,what i have currently is
java.lang.NoClassDefFoundError: java Exception in thread "main"
Thank you in advance
Mninawa
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
Hi Steve,thanx for your help.
On that not you are quite right,In the documentations for JVM,this is how you would execute .jar file,but now what i have is the combination of libraries,which makes up an application caller,which is that cmdParam,
well i have to find a way to execute them in C# and I thought using this way would solve the problem.
I thought one might have a solution besides the one in did,because i have to do them that way.
Mninawa
|
|
|
|
|
Hi,
1.
to execute a java class, you should issue the command "java [options] classname"
which means "java" is the command, and everything else is in the arguments.
So I would remove the "java " from cmdParams (I guess you already did that).
2.
Furthermore, in Java there is a direct link between composite class names (as in your "za.co.lightWave.control.DialogInputControl") and your file hierarchy. So your classpath (either the enviroment variable or the options you specify) must lead to the location that is holding
za\co\lightWave\control\DialogInputControl.class
java.lang.NoClassDefFoundError is the error you would get when not satisfying this requirement.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hello,
I wrote window application that has some datagrids and data from SQL. I saw in task manager that this application uses 23 MB memory. Is it considered as normal / high ? And if high how can i reduce it?
BTW it's only the beginning of the application writing. I will have to add much more datagrids and other stuff...
|
|
|
|
|
23MB is nothing to concern yourself with at all. It sounds quite modest to me, even for a small application.
Regards,
Rob Philpott.
|
|
|
|
|
.net memory management is different to non.net apps
See previous post and replies here[^] and here[^].
Simon
|
|
|
|
|
OK thanks.
But i am going to add much more datagrids to this application?
Does using with methods and classes reduces the memory usage or not?
I am nor worried now, but still there will be much more datagrids and stuff (about 10 times more datagrids)
|
|
|
|
|
michaelgr1 wrote: But i am going to add much more datagrids to this application?
It will be almost certainly be OK.
michaelgr1 wrote: Does using with methods and classes reduces the memory usage or not?
No, memory is not reduced, but it is good practise (because it improves maintainability) to divide your code up into clean logical blocks of classes the perform a single function and simple methods.
My advice is don't worry. If you reach a point in the future where your application starts to perform badly you can profile it then and reduce the bottle neck. It's almost impossible to predict in advance exactly where a bottle neck will occur, so don't waste time now trying to solve problems that you don't have yet. Besides, for data driven apps, the real bottle neck is almost certainly going to be related to loading the data from the database and nothing to do with memory usage on the client side.
Simon
|
|
|
|
|
Hi.
Does anyone know if it is possible to do a "search and replace" in the regex expression, without using the
RegEx.Replace method?
Alternatively: Does it exist a perl regex-library to be included i C#
Kjetil
|
|
|
|
|
Hi
I would like an application to automatically check for updates from a location on a company's internal network. Something like L:\Comapany Files\Application\
I do not have direct access to this network on my development machine. I'll just dump the new version in this folder manually.
(Running VS 2008)
Thanks
|
|
|
|
|
Click once deployment is the simplest way to go.
If click once isn't an option you'll have to code the updater manually. It will have to check the known location, compare the versions, download the update, stop itself and restart the new version. This is often done via a secondary "update app" because otherwise you'll have trouble copying the new binaries over the old ones while the app is still running.
Simon
|
|
|
|
|
Use FileSystemWatcher class
MS describes this as:
Use FileSystemWatcher to watch for changes in a specified directory. You can watch for changes in files and subdirectories of the specified directory. You can create a component to watch files on a local computer, a network drive, or a remote computer.
To watch for changes in all files, set the Filter property to an empty string ("") or use wildcards ("*.*"). To watch a specific file, set the Filter property to the file name. For example, to watch for changes in the file MyDoc.txt, set the Filter property to "MyDoc.txt". You can also watch for changes in a certain type of file. For example, to watch for changes in text files, set the Filter property to "*.txt".
There are several types of changes you can watch for in a directory or file. For example, you can watch for changes in Attributes, the LastWrite date and time, or the Size of files or directories. This is done by setting the NotifyFilter property to one of the NotifyFilters values. For more information on the type of changes you can watch, see NotifyFilters.
You can watch for renaming, deletion, or creation of files or directories. For example, to watch for renaming of text files, set the Filter property to "*.txt" and call the WaitForChanged method with a Renamed specified for its parameter.
The Windows operating system notifies your component of file changes in a buffer created by the FileSystemWatcher. If there are many changes in a short time, the buffer can overflow. This causes the component to lose track of changes in the directory, and it will only provide blanket notification. Increasing the size of the buffer with the InternalBufferSize property is expensive, as it comes from non-paged memory that cannot be swapped out to disk, so keep the buffer as small yet large enough to not miss any file change events. To avoid a buffer overflow, use the NotifyFilter and IncludeSubdirectories properties so you can filter out unwanted change notifications.
For a list of initial property values for an instance of FileSystemWatcher, see the FileSystemWatcher constructor.
Please note the following when using the FileSystemWatcher class.
Hidden files are not ignored.
In some systems, FileSystemWatcher reports changes to files using the short 8.3 file name format. For example, a change to "LongFileName.LongExtension" could be reported as "LongFi~.Lon".
This class contains a link demand and an inheritance demand at the class level that applies to all members. A SecurityException is thrown when either the immediate caller or the derived class does not have full-trust permission. For details about security demands, see Link Demands.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
|
Everyone,
I see that Rebbon Control in Microsoft office 2007 is beautiful.
Do you know where can i download a full and free (rebbon control)?
Then i can develop with c sharp.
Thanks,
Chuon Visoth
Angkor Wat - Cambodia
asp.net - c sharp beginner
|
|
|
|
|
If you change the spelling to ribbon and search here there's one in the articles.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Thanks for your comment.
Chuon Visoth
Angkor Wat - Cambodia
asp.net - c sharp beginner
|
|
|
|
|