I believe in c# you can just send 0xFE
i also think there are built in functions like HexToInt and IntToHex
I have a Matrix Orbital display that I've used with my VB6.0 app for several years now. Recently, I've begun upgrading my software to C#...
Anyway, in VB, I could use the following to send, say, a clear screen command to the display (control char + command).
How would I create the 0xFE in C#? I'm using the same MSCOMM control in both systems. Obviously, this syntax won't work in C#.Code:CP = Chr$(&HFE) MSComm.Output = CP & "X"
I've tried things like sending FE as a string, and even converting it to various types of int and char - Int32.Parse("FE", NumberStyles.HexNumber);...
Any tips?
I believe in c# you can just send 0xFE
i also think there are built in functions like HexToInt and IntToHex
[H]4 Life
My next generation Front End is right on schedule.
It will be done sometime in the next generation.
I'm a lesbian too.
I am for hire!
Found It!
Where:Code:int d = 0xFE; char d1 = Convert.ToChar(d); this.axMSComm1.Output = d1 + "X";0xFE is the MO Command PrefixX is the MO command for CLEAR SCREENEventually someone else will ask about this, so I wanted to get it in stone. Plus, it's highly likely that aliens will come down and crash my computer, now that I've jumped a hurdle.
or, more objectively, axMSComm1.Output = (char)0xFE + "X";Originally Posted by PatO
The conversion is explicit in the cast.
Bookmarks