• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 256
  • Last Modified:

How to change font of ToolTip

Dear Friends,
   I am developing a software with regional lnaguage support. When that software is run I want to display the tooltips in language related with that software in the local language. Wsing win API's is the solution. I am looking in that way. Please let me know your views abt it.
Thank you,
1 Solution
Custom ToolTips Dll (Version 2.0)

Éric MoreauSenior .Net ConsultantCommented:
Richie_SimonettiIT OperationsCommented:
You need to know local language configuration and load tooltip strings according it.
To know which language is:
(this is a general use to get all values from locale config, modify as you wish)

Option Explicit
'These declarations are designed
'for use in a .bas module
'since the constants are public

Declare Function GetLocaleInfo Lib "kernel32" Alias _
"GetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, _
ByVal lpLCData As String, ByVal cchData As Long) As Long

Declare Function SetLocaleInfo Lib "kernel32" Alias _
"SetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, _
ByVal lpLCData As String) As Boolean

Declare Function GetUserDefaultLCID% Lib "kernel32" ()
Public Enum LOCAL_INFO
 SymbolAM = &H28
 SymbolPM = &H29
End Enum
Public Function Get_locale(RSValue As LOCAL_INFO) ' Retrieve the regional setting

     Dim Symbol As String
     Dim iRet1 As Long
     Dim iRet2 As Long
     Dim lpLCDataVar As String
     Dim Pos As Integer
     Dim Locale As Long
     Locale = GetUserDefaultLCID()

'LOCALE_SDATE is the constant for the date separator
'as stated in declarations
'for any other locale setting just change the constant

'Function can also be re-written to take the
'locale symbol being requested as a parameter
     iRet1 = GetLocaleInfo(Locale, RSValue, _
     lpLCDataVar, 0)
     Symbol = String$(iRet1, 0)
     iRet2 = GetLocaleInfo(Locale, RSValue, Symbol, iRet1)
     Pos = InStr(Symbol, Chr$(0))
     If Pos > 0 Then
          Symbol = Left$(Symbol, Pos - 1)
          Get_locale = "Regional Setting = " + Symbol
     End If

End Function

Public Function Set_locale(RSValue As LOCAL_INFO) 'Change the regional setting

     Dim Symbol As String
     Dim iRet As Long
     Dim Locale As Long
'LOCALE_SDATE is the constant for the date separator
'as stated in declarations
'for any other locale setting just change the constant

'Function can also be re-written to take the
'locale information being set as a parameter

     Locale = GetUserDefaultLCID() 'Get user Locale ID
     Symbol = "-" 'New character for the locale
     iRet = SetLocaleInfo(Locale, RSValue, Symbol)
End Function

'****** end of bas file ******************

7 new features that'll make your work life better

It’s our mission to create a product that solves the huge challenges you face at work every day. In case you missed it, here are 7 delightful things we've added recently to monday to make it even more awesome.

Éric MoreauSenior .Net ConsultantCommented:
please maintain

Questions Asked 12
Last 10 Grades Given B A A A A  
Question Grading Record 5 Answers Graded / 5 Answers Received
Éric MoreauSenior .Net ConsultantCommented:
This question appears to be abandoned. A question regarding it will be left in the Community Support
area; if you have any comment about the question, please leave it here.

Unless there is objection or further activity, one of the moderators will be asked to accept the comment
of <hongjun >.

The link to the Community Support area is:

Richie_SimonettiIT OperationsCommented:
Just for clarification since my english is ugly than my code:
Question is regarding language support for tooltips not custom one, isn't it?
Éric MoreauSenior .Net ConsultantCommented:
The title and the text are saying different things!

I think it should be fair to splits points between <hongjun> (for the title) and <Richie_Simonetti> (for the text).
Richie_SimonettiIT OperationsCommented:
That's good to me.
Thanks for your help.

Points split ...
Points for Richie_Simonetti -> http://www.experts-exchange.com/jsp/qShow.jsp?qid=20309564

ATTENTION bhatul -->  Please click the following link and BRING ALL YOUR OPEN QUESTIONS TO A CONCLUSION.  Administration will be contacting you in this regard if they remain open for another 7 days.  You have nine (9) questions to resolve.


Moondancer - EE Moderator

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now