| Author: Sudip 24 Nov 2008 | Member Level: Silver | Rating:  Points: 5 |
Hi Sirisha,
Currently all simple VB control includes textbox label can only support ANSI code and when we assign value to these controls VB will automatically convert the Unicode to ANSI based on current system code page. If you really need to use Unicode supported controls, Forms 2.0 control comes from Office will be a good choice for you. Using Form2.0 controls outside Office is not supported by Microsoft, it works well with most of the VB applications. All form 2.0 controls can support Unicode well and display them correctly.
Wish you all the best.
|
| Author: Sudip 24 Nov 2008 | Member Level: Silver | Rating:  Points: 6 |
Hi Sirisha,
Here are some more example to give you proper solution: ' MDI form sample Option Explicit
Public Sub CaptionW(Optional ByRef NewCaption As String) ' update to new caption if a non vbNullString was passed If StrPtr(NewCaption) Then Me.Tag = NewCaption ' must have active form If Not Me.ActiveForm Is Nothing Then ' see if window state is maximized If Me.ActiveForm.WindowState = vbMaximized Then ' show both child caption and MDI caption UniCaption(Me) = UniCaption(Me.ActiveForm) & " - " & Me.Tag Else ' show only MDI caption UniCaption(Me) = Me.Tag End If Else ' show only MDI caption UniCaption(Me) = Me.Tag End If End Sub
Private Sub MDIForm_Load() ' set initial caption Me.CaptionW "MDI: " & ChrW$(&H3042) End Sub
Thank you.
|