Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 149,906 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 2,203 people online right now. Registration is fast and FREE... Join Now!




How to display Vulgar Fractions

 
Reply to this topicStart new topic

How to display Vulgar Fractions, How to display Vulgar Fraction One Third

Caeanis
17 Dec, 2007 - 04:44 AM
Post #1

New D.I.C Head
*

Joined: 17 Dec, 2007
Posts: 2


My Contributions
I have been unsuccessfully able to print the Vulgar Fraction One Third (⅓). I have tried using CHW(8537), ChW(&H2153), normalize and a few other suggestions I've seen posted elsewhere. Is there a way to return the exact character? Incidentally, the other vulgar fractions with even denominators (One Eighth for example) work just fine using Chw. I am trying to write the character to an xml file but I am using messagebox to double check that the correct value is getting posted.

Thank you!
User is offlineProfile CardPM
+Quote Post

orcasquall
RE: How To Display Vulgar Fractions
17 Dec, 2007 - 05:51 AM
Post #2

D.I.C Head
Group Icon

Joined: 14 Sep, 2007
Posts: 158



Thanked: 3 times
Dream Kudos: 50
My Contributions
Try ChrW(8531)

I think 8537 is 1/6...
User is offlineProfile CardPM
+Quote Post

Caeanis
RE: How To Display Vulgar Fractions
17 Dec, 2007 - 01:49 PM
Post #3

New D.I.C Head
*

Joined: 17 Dec, 2007
Posts: 2


My Contributions
QUOTE(orcasquall @ 17 Dec, 2007 - 06:51 AM) *

Try ChrW(8531)

I think 8537 is 1/6...


You are right. It is ChrW(8531), but it still gives me a square symbol. Is there a way to force that character or maybe to set the default font for dialog boxes? What I want to do is write the value as an innertext value of an xmlnode, but I want to be sure that it actually writes the vulgar fraction and not some nonsensical character.

Marc Tucker
User is offlineProfile CardPM
+Quote Post

orcasquall
RE: How To Display Vulgar Fractions
18 Dec, 2007 - 07:40 AM
Post #4

D.I.C Head
Group Icon

Joined: 14 Sep, 2007
Posts: 158



Thanked: 3 times
Dream Kudos: 50
My Contributions
I tried displaying the fraction in a message box. It looks fine, though a little small. Going on a guess here, maybe your Windows don't have Unicode support on display? Some setting perhaps?

As for writing to XML files, you can try writing the HTML entity & # 8531; (remove the 2 spaces between ampersand and hex, and hex and 8) directly into the file instead. Example, you can write the string "This is vulgar fraction one third & # 8531;" in the XML file (or inner text of node).
Check this out, and you can also search for "html entity vulgar fraction one third".

After you wrote the XML file, try opening it up in Internet Explorer, or any XML browser. You should have the fraction displayed.

This post has been edited by orcasquall: 18 Dec, 2007 - 07:46 AM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 01:22PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month