|
Using WMI, there isn't one. There 2 ways around this:
1. To write a service, installed and running on the client, that uses Win32 API function to get the same information and reports it back to a server application, either actively when anyone logs on, or when the server application poles the machine for it.
2. Write your own WMI class that provides this information and deploy it to all your clients. (Much more difficult because of a smaller documentation and example base)
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How can I compile forms in a separate DLLs to make it easy to update single forms?
Any other solutions other than DLL files?
|
|
|
|
|
|
Look at the articles about Plugins on this site, they should give you ideas
Example[^]
Gary
While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named 'Manual.'
- Dilbert
|
|
|
|
|
Hi everyone,
I have a form that has a lot of controls in it. While it is loading, controls appear one after another, giving my app an unprofessional look.
Is there any way to prevent updating my form until it is completely loaded?
Thanks
|
|
|
|
|
I don't know if I understood your question correctly, as I never saw this behavior happening (and I have some test machines that are old and slow) - it may be because you're creating dynamic controls. If this is the case, you could try using SuspendLayout/ResumeLayout (if your problem is the slow layout manager) or try sending a WM_SETREDRAW message to your form to prevent it redrawing while you're updating it.
Some controls also support the BeginUpdate()/EndUpdate() while you load data to them, e.g., the ListView, ListBox, TreeView, etc.
Yes, even I am blogging now!
|
|
|
|
|
Thanks for your reply. You got it correctly, and yes, I am creating dynamic controls, and they are not standard, but third party.
I know about the BeginUpdate and such of the treeview, thats what I was looking for, but applied to a form.
I'll try your suggestions, thanks for the info
|
|
|
|
|
Ok, I am using the .NET provided threadpool for an app that is doing a lot of things. Well, my poblem, I am trying to determine at any given point in time how many threads this application is spawning. The best I can think of is to make a API call.
I do not know which API I should call. Secondly, if someone else has a better suggestion on how to accomplish this I am all ears.
|
|
|
|
|
The following code should work:
Process.GetCurrentProcess().Threads.Count
www.troschuetz.de
|
|
|
|
|
dear All,
a) downloaded and installed the latest directX sdk for c#
yesterday.
however, discoffered that the documentation is only for c++
although c# is mentioned on the download website.
is there a c# directX doc?
b) i want to make an application showing loads of bars (bit like a bar chart). what is the best fucntion to do this in directX c#.
i was looking at vertex stuff, but i think it's a bit of an overkill for say 256 bars - output of an FFT)
many thanks, Dominik
|
|
|
|
|
As for the answer to b, I suggest the C# multimedia - DirectX[^] section on CP. My article is on a 2D game port and there are others that talk about just 2D and not 3D.
Steve Maier, MCSD MCAD
|
|
|
|
|
Hi all
I wrote an http download manager application for my personal use. First, I tried to open a tcp connection on port 80 and handled the handshake procedure with my own code. However not all servers gives the same replies so my application failed while connecting some secure sites...
Hence I decided to use the benefit of c# and replaced my http handshake stuff with webrequest and webresponse classes. But there is a problem.
Although it successfully downloads at first time, when I try to download another file on the same session, it ALWAYS throws a "(400) bad request" exception.
I even tried to download the same file twice, but again it downloaded on first try but threw the same exception on second try.
I have also tried request.abort() and response.close() methods to close any open connection but nothing changed!
If anyone can help me I'll appreciate.
Sincerely
can
mca@aecteknoloji.com
|
|
|
|
|
The best way of learning what you're doing wrong, is by monitoring HTTP, with a tool like Fiddler[^].
Do the same thing with a browser and your program and pay attention to headers and connections: probably you'll see what you're doing different from the browser and you'll be able to do the same thing with WebRequest and WebResponse.
Yes, even I am blogging now!
|
|
|
|
|
Hi
Thanks for your reply.. I'll try this
|
|
|
|
|
Hi,
imagine a Folder object, that contains a list of File objects. Each File object has a Folder parent. So we have a cyclic dependency here. When I try to return such structure with a web service, I get the following error:
System.Web.Services.Protocols.SoapException: Server was unable to process request. --> There was an error generating the XML document. --> A circular reference was detected while serializing an object of type Folder.
I've read that XmlSerializer can't handle cyclic dependencies. Does this mean that I cannot use web services to return such a structure, or is it a bug and will it be possible in 2.0 for example? Is there some kind of workaround for now?
Thanks in advance!
|
|
|
|
|
I've never tried this on a WebService, but some time ago I needed to serialize a circular reference with the XmlSerializer and it didn't work, but the SoapFormatter could. Since web services use soap, it should work, but I'm only guessing here...
Yes, even I am blogging now!
|
|
|
|
|
Hello,
how I am able to filter directories and copy real files only ?
C:\Temp\Subfolder\
C:\Temp\readme.txt
(Copy only readme.txt, not the Subfolder)
I am using
foreach(string Element in Files)
for getting all elements in a directory.
|
|
|
|
|
|
Use the Directory.GetFiles method to obtain the names of files in a specific directory and afterwards copy the files by using an overload of the File.Copy method.
www.troschuetz.de
|
|
|
|
|
i want write a codeEditor, so i want to know, can you help me?
i know it will uses the RegularExpressions , but i only konw this, i do not know what should i do next.
|
|
|
|
|
I am not sure that you mean, but if I understand you correctly, you need to color some text lines or words in a you application. Allmost all form components have two properties, called FORECOLOR and BACKCOLOR. They can easly be changed a follows:
MyTextBox.ForeColor = Color.Blue;
MyTextBox.BackColor = Color.White;
You can find Color in the namespace "System.Drawing".
Remember to add the line "using System.Drawing;" to top of your file.
|
|
|
|
|
Try SharpDevelop[^].
It's available as free, open source, have a separate syntax coloring editor control, and it's damn well documented - they even wrote a book, available in paper and as a free e-book download.
The control is stable, fast (as fast as this can be done in C#), and flexible.
Yes, even I am blogging now!
|
|
|
|
|
|
hi
i am a computr science studnt i have encountered the following problems in running your codes that i downloaded from your site
1- when i try to run these projects a message occurs that this project should be converted to the current visual studio version format and when i click ok to convert it another message occurs that it cannot be converted because it is a read only file and you must change the permissions on the file what should i do?
2- how do i add refernces in a c sharp project?
|
|
|
|
|
1 - Obviously you downloaded a solution that was created with Visual Studio.NET 2002 and tried to open it with the 2003 version, so the solution has to be converted. This fails because of the write protection of the files, so simply change this with the Windows Explorer. As a computer science student you should know how to do that.
2 - Go to the solution explorer, right-click on the Reference branch of your project, select add reference and then specify the assembly you want to reference to in the opening dialog.
www.troschuetz.de
|
|
|
|