Please I need help from anyone who know about my problem..
I m passing value to textBox.
I need to get that value and pass to CAN.
I store val as:
String^ myval=textBox1->Text;
and i m passing to CAN as:
Transmit.Data[0] = myval;
but i m getting error.
please tell me how to pass my value to CAN.

Thanks in Advance

Well, have you tried google?? heh heh! :P

And I'm not just being gratuitously facetious here, there is a serious point I'm trying to make.

For example:
After reading your post I really didn't know what CAN was, so I did a bit of googling of my own because I'm kinda curious like that.

According to wikipedia:

"Controller–area network (CAN or CAN-bus) is a vehicle bus standard designed to allow microcontrollers and devices to communicate with each other within a vehicle without a host computer."

(see http://en.wikipedia.org/wiki/Controller_area_network)

Hopefully this is the CAN you're referring to, it's the closest thing I could find!

Next I tried googling NCTYPE_UINT8. About half-way down the page I found a couple of .pdf manuals for the National Instruments CAN API which both appear to relate to the CAN bus standard mentioned above, so it looks like I'm on the right track!

The manual details all of the types used by the API and assuming this is the API you're using (I think the chances are pretty good!), it would seem that NCTYPE_UINT8 has been defined as unsigned char.
(see www.ni.com/pdf/manuals/370289c.pdf and www.ni.com/pdf/manuals/321369a.pdf to get the manuals)

So, given that information I guess you'd need to convert the string from your text box into a c-style string (char * or char array[]) and then perhaps convert (or typecast) and copy that into an unsigned char array.

And I think that's the solution to your problem.
Aren't search engines great?! ;)

And the moral to this story? The point I was trying to make?
Well, Google, Bing et al are your friends, use them to your advantage! I found out all of the information here in less time than it took to compose this rambling shamles of a post! heh heh! :)

Hope this is of some help!
Cheers for now,

P.S. As you actually have the API on your machine, if you right-clicked on NCTYPE_UINT8 in your C++ IDE and then selected the option to "go to definition" or something similar, you would probably have seen that NCTYPE_UINT8 was unsigned char without having to resort to google like I did!

commented: All good points and well researched! +4