|
As soon as I saw you response I knew the article, it is an excellent article but a hugely complex control. I played with it but found it too complex for my requirements. Mind you I also trashed Infragistics for the same reason!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I have no idea how the hamsters track the downloads but I guess that the low
number of downloads might be caused by the fact that the download is just a link to a sourceforge.net download?
All the best,
Dan
|
|
|
|
|
With the Browse Code tab it isn't really necessary to download the code to learn what it does and how it does it. That may explain the low numbers.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
thanks for the link. maybe ill try it later.
cheers!
if(you type your code here) {
Messagebox.Show("You help me a lot!");
}
else {
You help me = null;
}
|
|
|
|
|
Hello Everyone,
I'm trying to automate file's downloading process from my server using winscp command line stfp downloader. It was required to process some standard output to detect errors and some events, so I redirected the standard output and standard input of process and set the shellexcute to false. Now I'm able to see the output messages on rich text box using asycn readline (BeginOutputhttp://msdn.microsoft.com/en-us/library/system.diagnostics.process.beginoutputreadline.aspx[^]) method provided in Process library. Now my problem, how can I write my program such that it is able to write commands to standard input asycn and at same time making sure that no command is missed, if previous command is under processing.
Let say I've a text box and button..if I press a button then it writes the command on text box to standard input of the process and then it waits for the reply..and lets assume this whole task takes 2 seconds..but during this 2 seconds user can enter more commands which can not be ignored so must be added to some queue, which can executed later on. I'm not sure how should I achieve this? I'm sorry if I'm misunderstanding anything here..but I've no experience with mutli threading in C#..Please suggest some design pattern to do this..any help would be appreciated..
Thanks,
Regards
Shivam Kalra
modified on Friday, June 24, 2011 10:44 PM
|
|
|
|
|
You need to use a FIFO queue, lots of possible samples here[^].
The best things in life are not things.
|
|
|
|
|
Hello Experts,
I am Showing a form from another form. and it Set focus on Child Form by default.
But I don't want to lost focus from parent form.
So pls suggest me how can i do that?
For Ex: ChildForm Pf = new ChildForm;
Pf.Show();
Code set focus on PF Form but i do't want to change the previous focus.
Thanks
If you can think then I Can.
|
|
|
|
|
Try to do reset the focus on the caller form.
Form a = new Form();
a.Show();
this.Focus();
Bye
|
|
|
|
|
From MSDN[^]:
Focus is a low-level method intended primarily for custom control authors. Instead, application programmers should use the Select method or the ActiveControl property for child controls, or the Activate method for forms.
So, you should probably use Activate in this case.
|
|
|
|
|
That's a good point, I should be more detailed, but I was in hurry and he specifically spoke about the Focus.
Thanks
|
|
|
|
|
I transitioned from VB6 where SetFocus was the only thing you had (and an annoying thing too, kept throwing exceptions when it failed, rather than returning true or false).
I eventually discovered about the Select method while reading MSDN documentation about focus change events. Anyway, I'm guessing Select/Activate is more robust than SetFocus.
|
|
|
|
|
i'm using a msmq for my application and i create a queue when the application is loading.And to receive the message i set the timespan for 10, in the debug mode it works fine and the messages received as expected, but when i deploy the application in the release mode it gives a "timeout exception" at the receive method.
i would really appreciate your ideas about this .
thanks in advance.
|
|
|
|
|
If there are no messages in queue then it will raise tiemout exception.
No need to worry about that exception .. just catch it and say there are no messages in 'Q'.
No Defeat Is Final Until You Stop Trying!.......
|
|
|
|
|
You should also possibly increase your timeout (or at least make it configurable)
Or start another thread/method etc. to listen for the next message.
|
|
|
|
|
Hi,
I don't know much about icons and bitmaps so please bear with me.
I have a .ico file and several .png files provided to me. The code I have overlays the .png file to indicate a status. The code seems to work fine right up to the point that it gets an icon. The icon doesn't quite look right though it's hard to see in the system tray.
So I changed the code to write it out to a file and now it seems to look even worse (looks like a very small colour pallette) so I don't know if it's the same issue.
Here's a photo of the two files opened up on Visual Studio -
http://flickr.com/gp/psmithson/9s2KnQ
This is an extract of the code producing the two files -
Bitmap bmp = new Bitmap(stream);
bmp.Save("c:\\tmp\\stage1.ico");
IntPtr Hicon = bmp.GetHicon();
Icon icon = Icon.FromHandle(Hicon);
using (var fs = new FileStream("c:\\tmp\\stage2.ico", FileMode.Create, FileAccess.Write, FileShare.Delete))
{
int pgs = icon.Height;
icon.Save(fs);
}
The system tray icons don't look that bad but they're not quite right. Is there a limited pallette available in the system tray?
Thanks.
Peter.
|
|
|
|
|
This may be of help:
clickety[^]
Guy
Continuous effort - not strength or intelligence - is the key to unlocking our potential.(Winston Churchill)
|
|
|
|
|
Standard .ico icons do not support multi-level transparency. If your PNG overlay or generated bitmap contains that, strange things will happen. Saving to a .ico may well use a low colour depth by default.
I suspect the problem lies with where you are setting the system tray icon. That is a p/invoke if I remember right? Can you post the section where you set that (including setting up the image object that you assign to it)?
|
|
|
|
|
Transparency could be the main problem. The colours don't look so bad in the actual system tray but there is a black blob at the top right where it should be transparent.
I just dragged a NotifyIcon onto the form from the Toolbox under "Common Controls".
I get this generated -
this.notifyIcon = new System.Windows.Forms.NotifyIcon(this.components);
Then I just set the icon very simply -
notifyIcon.Icon = iconNoStatus;
The "iconNoStatus" is just an Icon that has been created using the code I posted initially.
Thanks.
|
|
|
|
|
Oh, I didn't know about that class. I guess that hides all the tricky bits.
I don't see anything in the Icon class that allows you to set colour depth – perhaps I am missing something?
|
|
|
|
|
Is there a way to transfer files to remote computer of different domain using remote server's username and password?(c#,console)
Thanks inadvance
No Defeat Is Final Until You Stop Trying!.......
|
|
|
|
|
Look at the FtpWebRequest Class[^]
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
Thanks for the reply..
is there any other ways other than Ftpwebrequest.. pls help me..
i have tried
1) MAP drive
2) NET USE
No Defeat Is Final Until You Stop Trying!.......
|
|
|
|
|
If you are looking for an off the shelf application, then I use FileZilla[^] - it's open source and works well.
You can't use MAP drive (AFIAK) unless the computer has a fixed IP address and share name - I've never tried that either, but in theory it should work.
NET USE will probably have the same problem.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
Thanks for the reply sir,
I want to achieve file transfer through c# console application by specifying remote system's domain,user name & password.
can it be done so..? pls help me..
No Defeat Is Final Until You Stop Trying!.......
|
|
|
|
|
The third example in the original link shows how to do that, I thought...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|