Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Greek Symbols in Labels

Greek Symbols in Labels

Scheduled Pinned Locked Moved Visual Basic
helpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hsprasain
    wrote on last edited by
    #1

    Hey all: I want to write some greek symbols in labels. Like instead of "phi" I want to display its symbol. Can you please help me how can I do this.

    L 1 Reply Last reply
    0
    • H hsprasain

      Hey all: I want to write some greek symbols in labels. Like instead of "phi" I want to display its symbol. Can you please help me how can I do this.

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      Hi, this is one way that works (I'm explaining in C# syntax, but that is not really relevant): open MS Word, type the text you want, use the "Insert Symbol..." menu to insert special characters (whose Unicode code you dont know by heart; keep a normal font, but adapt the subset as needed), then copy everything you want to the clipboard. Now either paste to the Text property of your label in Visual Designer. Or paste into the literal part of a statement such as myLabel.Text="..."; (if you do this with non-ASCII characters, Visual will suggest you save the source file in Unicode format, instead of regular ASCII). If you happen to know the Unicode codes, you can also insert Unicode escape characters in string literals (so you can keep an ASCII source file); in C# they take the form \u#### where # represents a hex digit. I trust something similar exists in VB.NET too These Unicode escape sequences however seem unavailable in Visual Designer. :)

      Luc Pattyn [My Articles] [Forum Guidelines]

      H 1 Reply Last reply
      0
      • L Luc Pattyn

        Hi, this is one way that works (I'm explaining in C# syntax, but that is not really relevant): open MS Word, type the text you want, use the "Insert Symbol..." menu to insert special characters (whose Unicode code you dont know by heart; keep a normal font, but adapt the subset as needed), then copy everything you want to the clipboard. Now either paste to the Text property of your label in Visual Designer. Or paste into the literal part of a statement such as myLabel.Text="..."; (if you do this with non-ASCII characters, Visual will suggest you save the source file in Unicode format, instead of regular ASCII). If you happen to know the Unicode codes, you can also insert Unicode escape characters in string literals (so you can keep an ASCII source file); in C# they take the form \u#### where # represents a hex digit. I trust something similar exists in VB.NET too These Unicode escape sequences however seem unavailable in Visual Designer. :)

        Luc Pattyn [My Articles] [Forum Guidelines]

        H Offline
        H Offline
        hsprasain
        wrote on last edited by
        #3

        Hey: Thanks. I tried with the first one. It works fine for me.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups