Results 1 to 10 of 10

Thread: [RESOLVED] Arabic Fonts in Textbox

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2012
    Location
    Dammam, Saudi Arabia
    Posts
    74

    Resolved [RESOLVED] Arabic Fonts in Textbox

    Hi All,
    How can i set arabic fonts to a textbox. I tried to set an arabic font to the textbox from properties. But, when I run my project and type something in that textbox it shows in English. I need the typed text to be shown in Arabic. Is there any way to get this done? If anyone knows, please do share with me.

  2. #2
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,060

    Re: Arabic Fonts in Textbox

    Perhaps Merri's UniText control might accomplish what you want.






    If it does not, then you can also try the UniSuiteFree VB6 Unicode ActiveX Controls.






    Or you may also want to see EditControls.




    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  3. #3
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    9,017

    Re: Arabic Fonts in Textbox

    As Bonnie implied, its a problem with controls in VB6. Most controls in VB6 weren't fashioned to work with Unicode strings which is why a custom control is necessary. Exotic texts like Arabic can only be represented by Unicode strings.
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Dec 2012
    Location
    Dammam, Saudi Arabia
    Posts
    74

    Re: Arabic Fonts in Textbox

    Thanks Bonnie. I tried UniSuiteFree VB6 Unicode ActiveX Controls. but still the text is showing in english only. is there any properties to set?

  5. #5
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Arabic Fonts in Textbox

    Another alternative is to use the Richtextbox control.
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Dec 2012
    Location
    Dammam, Saudi Arabia
    Posts
    74

    Re: Arabic Fonts in Textbox

    RichTextBox???? But How? It will show in Arabic?

  7. #7
    Default Member Bonnie West's Avatar
    Join Date
    Jun 2012
    Location
    InIDE
    Posts
    4,060

    Re: Arabic Fonts in Textbox

    I think you'll need to activate the Input Method Editor (IME). I'm not sure about this though because I've never used it before.




    On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
    Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Dec 2012
    Location
    Dammam, Saudi Arabia
    Posts
    74

    Re: Arabic Fonts in Textbox

    I tried it .. but its not working for me. I don't know whats wrong, may be I don't know how to set it..

    I tried EditControls too. Should i register it? if i register, will that show in Reference?

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Dec 2012
    Location
    Dammam, Saudi Arabia
    Posts
    74

    Re: Arabic Fonts in Textbox

    None of these tricks worked for me Guys..

    I found an alternative and it works fine for me.
    I used a normal TextBox , set the font to an Arabic font and in the form load i changed its font.charset to 178
    Then in the Textbox's got focus event i just changed the Keyboard language to arabic and in its lost focus event i changed the keyboard language back to English.

    This works just fine for me. And, also i don't have any problem to save this text to my database and to retrieve it from there..

    Thank you guys for the support!!

  10. #10
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: Arabic Fonts in Textbox

    Glad that you sorted it out and only using an ordinary textbox at that! You can now mark this thread as resolved then. =)
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width