Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > LCD/Display


Reply
 
Share Thread Tools Display Modes
Old 01-20-2004, 08:38 PM   #1
FLAC
 
PatO's Avatar
 
Join Date: Dec 2000
Location: Afton MN
Posts: 1,120
PatO is on a distinguished road
MO Command Prefix in C#

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).
Code:
CP = Chr$(&HFE) MSComm.Output = CP & "X"

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#.
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?
__________________
http://www.jeepmp3.com/
CarPC Stolen. Starting over.
Ne1 recognize the avatar?
PatO is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 01-21-2004, 03:10 AM   #2
I'm sorry, and you are....?
 
frodobaggins's Avatar
 
Join Date: Jan 2003
Location: Ruston, LA
Posts: 8,846
frodobaggins will become famous soon enoughfrodobaggins will become famous soon enough
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!
frodobaggins is offline   Reply With Quote
Old 01-21-2004, 06:53 PM   #3
FLAC
 
PatO's Avatar
 
Join Date: Dec 2000
Location: Afton MN
Posts: 1,120
PatO is on a distinguished road
Found It!
Code:
int d = 0xFE; char d1 = Convert.ToChar(d); this.axMSComm1.Output = d1 + "X";

Where:
0xFE is the MO Command Prefix
X is the MO command for CLEAR SCREEN
Eventually 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.
__________________
http://www.jeepmp3.com/
CarPC Stolen. Starting over.
Ne1 recognize the avatar?
PatO is offline   Reply With Quote
Old 01-22-2004, 01:58 AM   #4
Low Bitrate
 
spectrumzz's Avatar
 
Join Date: Sep 2003
Posts: 88
spectrumzz is on a distinguished road
Quote: Originally Posted by PatO
Found It!
Code:
int d = 0xFE; char d1 = Convert.ToChar(d); this.axMSComm1.Output = d1 + "X";

Where:
0xFE is the MO Command Prefix
X is the MO command for CLEAR SCREEN
Eventually 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";

The conversion is explicit in the cast.
spectrumzz is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GPS & TMV Software ( UK Only At The Mo ) ccsnet GPS 11 01-20-2004 12:41 PM
Autoplay going in slo mo! jakeep Auto-Play 1 04-11-2003 06:33 PM



All times are GMT -5. The time now is 08:10 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics