Click here to Skip to main content
15,921,467 members
Home / Discussions / C#
   

C#

 
AnswerRe: ShowBalloonTip of notifyicon not working Pin
Wendelius6-Jan-09 2:19
mentorWendelius6-Jan-09 2:19 
QuestionPanels - Changing their width and dealing with the Horizontal Scroll Bar Pin
Matthew Klein6-Jan-09 2:07
Matthew Klein6-Jan-09 2:07 
AnswerRe: Panels - Changing their width and dealing with the Horizontal Scroll Bar Pin
EliottA6-Jan-09 2:14
EliottA6-Jan-09 2:14 
AnswerRe: Panels - Changing their width and dealing with the Horizontal Scroll Bar Pin
EliottA6-Jan-09 7:28
EliottA6-Jan-09 7:28 
AnswerRe: Panels - Changing their width and dealing with the Horizontal Scroll Bar Pin
#realJSOP6-Jan-09 8:31
professional#realJSOP6-Jan-09 8:31 
GeneralRe: Panels - Changing their width and dealing with the Horizontal Scroll Bar Pin
Matthew Klein6-Jan-09 10:28
Matthew Klein6-Jan-09 10:28 
Questionfilling and adding to byte array [modified] Pin
A4ad6-Jan-09 2:04
A4ad6-Jan-09 2:04 
AnswerRe: filling and adding to byte array Pin
Le centriste6-Jan-09 2:21
Le centriste6-Jan-09 2:21 
A4ad wrote:
messageheader= BitConverter.GetBytes(01); // this must be divided into two bytes within the array


Since BitConverter.GetBytes() returns an array, your messageheader gets reassigned, thus losing the reference created 3 lines above. What you need to do is:

byte[] messageheader = new byte[10];
messageheader[0] = 0x16;                
messageheader[1] = 0x01;
Array.Copy(BitConverter.GetBytes(01), 0, messageheader, 2, 2); // Copy 2 bytes to positions 2 and 3.
messagehd[4] = 02; // NOTE: If you need to copy 2 bytes from above, your previous code would be overriding the second one. Change the index.
messageheader[5] = 00;     
messageheader[6] = (byte)(message.Length);
serialPort1.Write(messagehd, 0, messagehd.Length);

GeneralRe: filling and adding to byte array Pin
A4ad6-Jan-09 21:31
A4ad6-Jan-09 21:31 
GeneralRe: filling and adding to byte array Pin
Le centriste7-Jan-09 1:02
Le centriste7-Jan-09 1:02 
QuestionHow to change computer name with c# ? Pin
mshannaq6-Jan-09 1:44
mshannaq6-Jan-09 1:44 
AnswerRe: How to change computer name with c# ? Pin
Simon P Stevens6-Jan-09 1:55
Simon P Stevens6-Jan-09 1:55 
GeneralRe: How to change computer name with c# ? Pin
Luc Pattyn6-Jan-09 2:34
sitebuilderLuc Pattyn6-Jan-09 2:34 
QuestionFind .exe file using c# Pin
Abdul Rahman Hamidy6-Jan-09 1:12
Abdul Rahman Hamidy6-Jan-09 1:12 
AnswerRe: Find .exe file using c# Pin
Dave Kreskowiak6-Jan-09 7:42
mveDave Kreskowiak6-Jan-09 7:42 
GeneralRe: Find .exe file using c# Pin
Abdul Rahman Hamidy6-Jan-09 21:13
Abdul Rahman Hamidy6-Jan-09 21:13 
GeneralRe: Find .exe file using c# Pin
Dave Kreskowiak7-Jan-09 2:21
mveDave Kreskowiak7-Jan-09 2:21 
QuestionPerformance issue Pin
DJ2456-Jan-09 1:00
DJ2456-Jan-09 1:00 
AnswerRe: Performance issue Pin
Wendelius6-Jan-09 1:19
mentorWendelius6-Jan-09 1:19 
GeneralRe: Performance issue Pin
DJ2457-Jan-09 18:19
DJ2457-Jan-09 18:19 
GeneralRe: Performance issue Pin
Wendelius7-Jan-09 19:40
mentorWendelius7-Jan-09 19:40 
GeneralRe: Performance issue Pin
DJ2457-Jan-09 20:55
DJ2457-Jan-09 20:55 
GeneralRe: Performance issue Pin
Wendelius7-Jan-09 21:04
mentorWendelius7-Jan-09 21:04 
GeneralRe: Performance issue Pin
DJ2457-Jan-09 21:21
DJ2457-Jan-09 21:21 
GeneralRe: Performance issue Pin
Wendelius7-Jan-09 21:40
mentorWendelius7-Jan-09 21:40 

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.