Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Localing in VB (again)

  • 09-05-2001 1:56pm
    #1
    Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭


    What version of VB are you using? The latest version should support unicode fine.

    Also what operating system are you using and what is it's locale set to?

    Also the fonts on the command button, you are using a Unicode font? (I assume you are).


Comments

  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    It's VB6

    On NT 4 can't even set the local to Japan although we can display japanese characters (see below).
    On Win 2000 we can set the local but it doesn't make any difference, the characters display fine in a resource file but not on the buttons.

    The fonts we've been using are Fixedsys, System and MSGothic (as recommended my microsoft). We can display the characters on a form with MSGothic using an API call, but this call doesn't work for command buttons as they don't have a device context handle. So aaaaaaaagh!, I came to this f*cking company to code in Java and get away from windows but because if my windows experience I get all these sh*tty jobs in vb. Japanese ffs! mad.gif

    Anyway, any help would be much appreciated.


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Blah... spoke to a Japanese developer here.

    Should work fine, try writing the program on a Japanese operating system. At a guess your font isn't mapping correctly.



  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    Tried that, and it didn't work for the buttons or labels, it did work for the caption bar. I think I'll need a japanese version of VB, b*llox.


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    Thought I'd start a new topic for this one:

    Vb's command buttons do not support unicode, apparently. Does anybody know where I can find a replacement?


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    Right,

    If you set the controls characters set to SHIFT-JIS (value of 128) and set the font to FixedSys it will display Japanese characters.
    Const SHIFT_JIS = 128
    
    Private Sub Form_Load()
    
        With Command1
           .Font.Charset = SHIFT_JIS
           .Font.Name = "FixedSys"
           .Caption = LoadResString(101) '// Where res string is japanese characters
        End With
    
    End Sub
    


    phweeew! thank god that's over.


    [edited to fix syntax error]

    [This message has been edited by Evil Phil (edited 11-05-2001).]


  • Advertisement
Advertisement