|
Look into using an asynchronous request, then. I think that it might be possible to track the process of the request.
---
b { font-weight: normal; }
|
|
|
|
|
Hello.
I am trying to change some datagrid row colours. I've already created a new paint function that needs the following parameters:
System.Drawing.Graphics g,
System.Drawing.Rectangle bounds,
CurrencyManager source,
int rowNum,
System.Drawing.Brush backBrush,
System.Drawing.Brush foreBrush,
bool alignToRight.
Then I want to call this function in the datagrid paint event but I need the correct parameters.How can I do this???
Thanks.
|
|
|
|
|
Creating a tool that will query the wmiClass of "client" PCs.
I do not want to have any software installed on the client side,
all clients are behind the same router, so I don't have any concerns there.
I'm looking for the best way to connect to aprox 100 PCs. -- the intended operation would be: user clicks button, button event polls pcs, listener client logs all replies, using list of replies poll each pc for all required info (i'd like to just udp the clients with the wmi login info, and query so that it just replies with the info, but not sure yet if that is possible or even a safe move)
looking for any good ideas or previous attempts that were sucessful in doing this.
I've considered using UDP to conduct an initial poll of the PCs, then use the returned name of the pc to conduct the TCP request of wmi.
I've also considered using a static list of IPs, but dont like that idea, so maybe a semi-static ip list?
and lastly i've considered finding a way to intergrate with active directory to return a list of pcs, which is fine, as long as we don't have any non-registered clients
again, just looking for any thoughts of a good way to do this...and of course if you know of any refrence material that is open for use that would be much appreciated as well.
string Beautiful;
Beautiful = "ignorant";
label1.Text = "The world is full of " + Beautiful +" people.";
Why is common sense such an un-common comodity?
|
|
|
|
|
My friend is making an IRC-like client (I'm making the server), and I was wondering what's the best way to handle the tabs for each channel?
Remake each chat window and user list?
Here's the code:
http://s4.yousendit.com/d.aspx?id=3OQ7SU0PMBCKZ120NWZ2G7SFDV
|
|
|
|
|
The user can set for a field of my table an OLEObject as:
.txt
.bmp
.xls
.mp3
When i try to get it back, how can i know what kind the file is it?
|
|
|
|
|
many files like jpeg,gif except txt has three or more characters specifying
on the begnning of the file; also u can store the mime type on db as well.But the first might help...
mp3->ID3
jpeg->jFIF or others
view your files in notepad answers are there
Mikail Çetinkaya . The C# DEveloper
-- modified at 11:27 Tuesday 3rd January, 2006
|
|
|
|
|
In all versions of Visual Studio .Net (including 2005) the ListView control incorrectly updates the gridlines in detail mode when clicking the arrows of the scroll bar. Sometimes the lines are not painted, other they are duplicated.
Is this a documented bug of this control?
Thanks
|
|
|
|
|
I have several custom controls in my form( eg: round edge panels, controls inherited from label abd button). Sometimes all the controls in my form suddenly disappear in the designer. This is really scary. Since I would have a backup in my source safe that saves me but could anyone explain this better so that I can avoid the cause of this action.
Thanks in advance.
VPMahank
|
|
|
|
|
Are you using VS2003 or 2005? If you're using 2003, this bug is a known bug, see this blog post[^] for more info. FYI it's fixed in 2005.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Bought a House!
Judah Himango
|
|
|
|
|
Unfortunately I am using 2003. Is there anyway at all to avoid this.
Thanks
VPMahank
|
|
|
|
|
There are some workarounds linked to in the article. The main thing to keep in mind is that if all your controls disappear, just close the designer forms without saving anything.
AFAIK, there was no official fix for this from Microsoft.
Fortunately, the bug is fixed in VS 2005.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Bought a House!
Judah Himango
|
|
|
|
|
Thanks so much for the link. It was really helpful.
Could you let me know on how to write a macro to say close all the designer windows in IDE just before making a build.
Any links would also be great.
Thanks in advance
VPMahank.
|
|
|
|
|
I'm afraid I've no experience writing VS macros. You're on your own there, although I'm sure there are some articles on CodeProject or the web that should help you out.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Bought a House!
Judah Himango
|
|
|
|
|
???
This happens to me using 2005 Standard!
___________________________________
Tozzi is right: Gaia is getting rid of us.
My Blog [ITA]
|
|
|
|
|
Guys, how do I prevent Wait cursor from showing in my app? I'm using a webBrowser control in my app and every time this webbrowser control loads a page the cursor changes to the Wait cursor with the hourglass. I don't want it to appear at all. I've tried everything and I can't seem to get it to stop showing!!!!
I've tried setting Cursor.
Cursor.Current = Cursors.Arrow;
No effect.
I've tried setting UsingWaitCursor property to false. Nothing... no change.
Please help!!!!
|
|
|
|
|
Perhaps you could first download the content you want to display in a separate thread, then set it into the control?
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
Hi. I need to develop a monitoring application which will show data based on a database. The only way to access the database is through a web service. I need to make these application with Windows Forms and the refresh time should be 1 second. The problem is that the database and the webservice could take longer to answer.
Is there any best practices that I should follow or any example?
Thanks
|
|
|
|
|
Hi,
I was wondering if there is a way to limit the bandwidth (kb/sec) when downloading a web page?(C#)
If the page is to large, in order not to let the HTTPWebRequest/Response use all bandwidth available, to limit the download to 1kb/sec for instance.
Are timers, buffer size and thread(sleep, suspend) a suitable solution for this ?
|
|
|
|
|
my 2C are:
use a buffer that is filled with new data at regular intervals, this will limit the total bandwith usage by any user but it will not restrict the actual downloada speed, here's some code (pretty schematic):
while(!donwloadcompleted)
if(GetTime-elapsed>X)
{buffer=new data;
elapsed=GetTime;
//yourdownloadprocedure;
}
then do the download thingy;
hope this helps
m$: It is normal for your screen to go blank and for your computer to restart itself several times
|
|
|
|
|
Hi All,
I want to close a directory which is being opened.what i have is only the path of the directory.How can i emulate clicking the close button on this window programmatically.Thanks in Advance.
Rakesh
|
|
|
|
|
Hi
is the opened directory the file explorer? if yes, how you start this process, with ShellExecute or with the .NET Process class?
|
|
|
|
|
Hi Joe,
Thanks for your reply.I have opened the directory using Process Class of .Net framework.And it is being opened in explorer.Any suggestions how i can achieve this.Thanks in Advance.
Rakesh
|
|
|
|
|
Hi Rakesh
the process class has a property named Handle. with this property you can use the interop function SendMessage with the parameter WM_CLOSE.
example: SendMessage(Handle, WM_CLOSE, 0, 0);
or
use the Kill Methode of your process class.
|
|
|
|
|
Hi Joe,
Thanks for your reply.both Process.kill and SendMessage are throwing the same error.
System.InvalidOperationException: No process is associated with this object.
I tried with both UseShellExecute equal to true and false.In sendMessage case the error is coming while I am trying to use the Handle property.So the error is not coming in calling the sendMessage method but in getting the handle.Any Suggestions.I also tries using the startverb both as "Open" and "kill" but the result was same.Thanks in Advance.
Rakesh
|
|
|
|
|
Hi Joe,
My mistake that I hadn't specified the process name "explorer.exe" in the process.now I am able to get the handle but process.kill gives the error that the process is already exited.and closeHandle does not do anything.using getlasterror i am getting the following error.
ERROR_MOD_NOT_FOUND
126 The specified module could not be found.
here is the code
static int WM_CLOSE = 0x0010;
string path = @"C:\Documents and Settings\rakesh\Desktop\A"
pr.StartInfo.CreateNoWindow = true;
pr.StartInfo.Verb = "Open";
pr.StartInfo.FileName = "explorer.exe";
pr.StartInfo.Arguments = path;
pr.Start();
//pr.Kill();//gives the error the process has already exited
iptr = pr.Handle;
SendMessage(iptr,(uint)WM_CLOSE,0,0);
int errorCode = Marshal.GetLastWin32Error();
Console.WriteLine("errorCode::"+errorCode.ToString());//gives errorcode 126
**************************************
Any help will be greatly appreciated.Thanks in Advance.
Rakesh
|
|
|
|