Hi, I've tried most method that I found on the internet but no lucky to set a Unicode title on Window Server. This is how the application look like on Window Server:
VB.NET Code so simply:
VB6 Code - not working for Window Server 2008 or classic or non-themed mode:Code:Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Me.Text = ChrW(1088) & ChrW(1089) & ChrW(1090) & ChrW(1091) End Sub
Code:Option Explicit Private Declare Function GetModuleHandleW Lib "kernel32" (ByVal lpModuleName As Long) As Long Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, ByVal lpProcName As String) As Long Private Declare Function GetWindowLongA Lib "user32" (ByVal hWnd As Long, ByVal nIndex As Long) As Long Private Declare Function SetWindowLongA Lib "user32" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare Function SetWindowLongW Lib "user32" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare Function SetWindowTextW Lib "user32" (ByVal hWnd As Long, ByVal lpString As Long) As Long Private Const GWL_WNDPROC = -4 Private m_Caption As String Public Property Get CaptionW() As String CaptionW = m_Caption End Property Public Property Let CaptionW(ByRef NewValue As String) Static WndProc As Long, VBWndProc As Long m_Caption = NewValue ' get window procedures if we don't have them If WndProc = 0 Then ' the default Unicode window procedure WndProc = GetProcAddress(GetModuleHandleW(StrPtr("user32")), "DefWindowProcW") ' window procedure of this form VBWndProc = GetWindowLongA(hWnd, GWL_WNDPROC) End If ' ensure we got them If WndProc <> 0 Then ' replace form's window procedure with the default Unicode one SetWindowLongW hWnd, GWL_WNDPROC, WndProc ' change form's caption SetWindowTextW hWnd, StrPtr(m_Caption) ' restore the original window procedure SetWindowLongA hWnd, GWL_WNDPROC, VBWndProc Else ' no Unicode for us Caption = m_Caption End If End Property ' usage sample Private Sub Form_Load() '??????? ????? ?? ????? ???? ? ?????? CaptionW = ChrW$(1088) & ChrW$(1089) & ChrW$(1090) & ChrW$(1091) End Sub
Anyone know how to fix this issue?Thank you all a lot




Thank you all a lot
Reply With Quote