|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Playing card suits, vb.net?Another newbie question. I'm writing a program that reviews a text
file history of an online poker hand. I'm using VB compact framework, for a pocket pc. I'm trying to find a simple way to represent the suits of cards, clubs, diamonds, spades, hearts, in a string. I thought for sure there would be some sort of ASCII symbol that I could just use in a string, but I haven't found anything. Is there a simple way to do this that I am missing? Thanks for any help. eejit Hi,
Maybe there is something the card game starter kit to help. http://msdn.microsoft.com/vbasic/downloads/starterkits/default.aspx Ken ---------------- Show quoteHide quote "eejit" <ee***@canada.com> wrote in message news:7g7c32hunt611l8875jlnj6bvidlsfr6vq@4ax.com... > Another newbie question. I'm writing a program that reviews a text > file history of an online poker hand. > > I'm using VB compact framework, for a pocket pc. > > I'm trying to find a simple way to represent the suits of cards, > clubs, diamonds, spades, hearts, in a string. I thought for sure there > would be some sort of ASCII symbol that I could just use in a string, > but I haven't found anything. > > Is there a simple way to do this that I am missing? > > Thanks for any help. > > eejit eejit wrote:
Show quoteHide quote > Another newbie question. I'm writing a program that reviews a text The suits are in the Arial font. Open up charmap (start->run->charmap) > file history of an online poker hand. > > I'm using VB compact framework, for a pocket pc. > > I'm trying to find a simple way to represent the suits of cards, > clubs, diamonds, spades, hearts, in a string. I thought for sure there > would be some sort of ASCII symbol that I could just use in a string, > but I haven't found anything. > > Is there a simple way to do this that I am missing? > > Thanks for any help. > > eejit and you'll see them if you scroll down (U+2660 it tells me in the status line of charmap). -- Rinze van Huizen C-Services Holland b.v > > I'm trying to find a simple way to represent the suits of cards, Public Const chSpade As Char = ChrW(9824)> > clubs, diamonds, spades, hearts, in a string. I thought for sure there > > would be some sort of ASCII symbol that I could just use in a string, > > but I haven't found anything. Public Const chHeart As Char = ChrW(9829) Public Const chDiamond As Char = ChrW(9830) Public Const chClub As Char = ChrW(9827) Use these just like any other string, eg "A" & chSpade gives "Aâ™ ". These are the correct values, but not all fonts cooperate. This is unicode, not ascii, where a character in a string is 16 bits (not 8). Unicode is the default for basic, so you don't have to do anything special to call ChrW() with big numbers. If you need to print, your printer may not be capable of representing these characters, so you may need a fallback, maybe s,h,d,c. '8s 8c As Jd 2h' doesn't look too bad. On Fri, 7 Apr 2006 06:39:01 -0700, AMercer
<AMer***@discussions.microsoft.com> wrote: Show quoteHide quote >> > I'm trying to find a simple way to represent the suits of cards, Thanks to everyone for taking the time to reply.>> > clubs, diamonds, spades, hearts, in a string. I thought for sure there >> > would be some sort of ASCII symbol that I could just use in a string, >> > but I haven't found anything. > >Public Const chSpade As Char = ChrW(9824) >Public Const chHeart As Char = ChrW(9829) >Public Const chDiamond As Char = ChrW(9830) >Public Const chClub As Char = ChrW(9827) > >Use these just like any other string, eg "A" & chSpade gives "A?". These >are the correct values, but not all fonts cooperate. > >This is unicode, not ascii, where a character in a string is 16 bits (not >8). Unicode is the default for basic, so you don't have to do anything >special to call ChrW() with big numbers. > >If you need to print, your printer may not be capable of representing these >characters, so you may need a fallback, maybe s,h,d,c. '8s 8c As Jd 2h' >doesn't look too bad. I decided to go with the arial font chrw(9824) method. I tested it out in vb and it works, but for some reason when I try it using the compact framework, arial font, instead of the playing card suit, I get a square. So I'm not quite sure what is going on here. thanks again for the help. eejit
Timespan perplexing, please help with brain freeze.
Threading 101 Can the read() function in VB.NET start reading from somewhere else than 0 Frustrations with RTF format. Reg expression How to declare char string pointer in VB? DataGridView - Property DataPropertyName KeyDown for non Active windows? XML Logging Write one record Shared Variable Question VB.NET 2003 |
|||||||||||||||||||||||