Click here to Skip to main content
15,900,907 members
Home / Discussions / C#
   

C#

 
AnswerRe: Not Lost focus of form. Pin
Mario Majčica24-Jun-11 4:12
professionalMario Majčica24-Jun-11 4:12 
SuggestionRe: Not Lost focus of form. Pin
MicroVirus24-Jun-11 6:08
MicroVirus24-Jun-11 6:08 
GeneralRe: Not Lost focus of form. Pin
Mario Majčica24-Jun-11 9:50
professionalMario Majčica24-Jun-11 9:50 
GeneralRe: Not Lost focus of form. Pin
MicroVirus24-Jun-11 11:14
MicroVirus24-Jun-11 11:14 
Questionmsmq throws an exception when called the receive. Pin
prasadbuddhika23-Jun-11 19:45
prasadbuddhika23-Jun-11 19:45 
AnswerRe: msmq throws an exception when called the receive. Pin
surender.m23-Jun-11 20:58
surender.m23-Jun-11 20:58 
GeneralRe: msmq throws an exception when called the receive. Pin
mahendren29-Jun-11 2:03
mahendren29-Jun-11 2:03 
QuestionCreating an icon for the system tray - losing a lot of colours! Pin
Peter_Smithson23-Jun-11 1:45
Peter_Smithson23-Jun-11 1:45 
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"); // save what we have here
      IntPtr Hicon = bmp.GetHicon();
      Icon icon = Icon.FromHandle(Hicon);
      // Looking at stage2.ico gives a different version to stage1.ico
      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.
AnswerRe: Creating an icon for the system tray - losing a lot of colours! Pin
GuyThiebaut23-Jun-11 4:47
professionalGuyThiebaut23-Jun-11 4:47 
AnswerRe: Creating an icon for the system tray - losing a lot of colours! Pin
BobJanova23-Jun-11 4:53
BobJanova23-Jun-11 4:53 
GeneralRe: Creating an icon for the system tray - losing a lot of colours! Pin
Peter_Smithson23-Jun-11 5:32
Peter_Smithson23-Jun-11 5:32 
GeneralRe: Creating an icon for the system tray - losing a lot of colours! Pin
BobJanova23-Jun-11 6:25
BobJanova23-Jun-11 6:25 
QuestionIs there a way to transfer files to remote computer of different domain using remote server's username and password??? (c# , console) Pin
surender.m23-Jun-11 0:10
surender.m23-Jun-11 0:10 
AnswerRe: Is there a way to transfer files to remote computer of different domain using remote server's username and password??? (c# , console) Pin
OriginalGriff23-Jun-11 0:26
mveOriginalGriff23-Jun-11 0:26 
GeneralRe: Is there a way to transfer files to remote computer of different domain using remote server's username and password??? (c# , console) Pin
surender.m23-Jun-11 0:39
surender.m23-Jun-11 0:39 
AnswerRe: Is there a way to transfer files to remote computer of different domain using remote server's username and password??? (c# , console) Pin
OriginalGriff23-Jun-11 0:48
mveOriginalGriff23-Jun-11 0:48 
GeneralRe: Is there a way to transfer files to remote computer of different domain using remote server's username and password??? (c# , console) Pin
surender.m23-Jun-11 0:54
surender.m23-Jun-11 0:54 
AnswerRe: Is there a way to transfer files to remote computer of different domain using remote server's username and password??? (c# , console) Pin
OriginalGriff23-Jun-11 1:00
mveOriginalGriff23-Jun-11 1:00 
GeneralRe: Is there a way to transfer files to remote computer of different domain using remote server's username and password??? (c# , console) Pin
surender.m23-Jun-11 1:10
surender.m23-Jun-11 1:10 
AnswerRe: Is there a way to transfer files to remote computer of different domain using remote server's username and password??? (c# , console) Pin
OriginalGriff23-Jun-11 1:18
mveOriginalGriff23-Jun-11 1:18 
GeneralRe: Is there a way to transfer files to remote computer of different domain using remote server's username and password??? (c# , console) Pin
surender.m23-Jun-11 2:03
surender.m23-Jun-11 2:03 
GeneralRe: Is there a way to transfer files to remote computer of different domain using remote server's username and password??? (c# , console) Pin
Pete O'Hanlon23-Jun-11 2:39
mvePete O'Hanlon23-Jun-11 2:39 
GeneralRe: Is there a way to transfer files to remote computer of different domain using remote server's username and password??? (c# , console) Pin
surender.m23-Jun-11 3:02
surender.m23-Jun-11 3:02 
GeneralRe: Is there a way to transfer files to remote computer of different domain using remote server's username and password??? (c# , console) Pin
Pete O'Hanlon23-Jun-11 3:07
mvePete O'Hanlon23-Jun-11 3:07 
GeneralRe: Is there a way to transfer files to remote computer of different domain using remote server's username and password??? (c# , console) Pin
surender.m23-Jun-11 19:13
surender.m23-Jun-11 19:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.