Solved

How to change font of ToolTip

Posted on 2002-04-21
9
238 Views
Last Modified: 2013-12-02
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,
Regards,
       bhatul
0
Comment
Question by:bhatul
9 Comments
 
LVL 33

Accepted Solution

by:
hongjun earned 50 total points
ID: 6957493
Custom ToolTips Dll (Version 2.0)
http://www.freevbcode.com/ShowCode.Asp?ID=1232



hongjun
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 6958064
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6958477
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
 LOCALE_ICENTURY = &H24
 LOCALE_ICOUNTRY = &H5
 LOCALE_ICURRDIGITS = &H19
 LOCALE_ICURRENCY = &H1B
 LOCALE_IDATE = &H21
 LOCALE_IDAYLZERO = &H26
 LOCALE_IDEFAULTCODEPAGE = &HB
 LOCALE_IDEFAULTCOUNTRY = &HA
 LOCALE_IDEFAULTLANGUAGE = &H9
 LOCALE_IDIGITS = &H11
 LOCALE_IINTLCURRDIGITS = &H1A
 LOCALE_ILANGUAGE = &H1
 LOCALE_ILDATE = &H22
 LOCALE_ILZERO = &H12
 LOCALE_IMEASURE = &HD
 LOCALE_IMONLZERO = &H27
 LOCALE_INEGCURR = &H1C
 LOCALE_INEGSEPBYSPACE = &H57
 LOCALE_INEGSIGNPOSN = &H53
 LOCALE_INEGSYMPRECEDES = &H56
 LOCALE_IPOSSEPBYSPACE = &H55
 LOCALE_IPOSSIGNPOSN = &H52
 LOCALE_IPOSSYMPRECEDES = &H54
 LOCALE_ITIME = &H23
 LOCALE_ITLZERO = &H25
 LOCALE_NOUSEROVERRIDE = &H80000000
 SymbolAM = &H28
 SymbolPM = &H29
 LOCALE_SABBREVCTRYNAME = &H7
 LOCALE_SABBREVDAYNAME1 = &H31
 LOCALE_SABBREVDAYNAME2 = &H32
 LOCALE_SABBREVDAYNAME3 = &H33
 LOCALE_SABBREVDAYNAME4 = &H34
 LOCALE_SABBREVDAYNAME5 = &H35
 LOCALE_SABBREVDAYNAME6 = &H36
 LOCALE_SABBREVDAYNAME7 = &H37
 LOCALE_SABBREVLANGNAME = &H3
 LOCALE_SABBREVMONTHNAME1 = &H44
 LOCALE_SCOUNTRY = &H6
 LOCALE_SCURRENCY = &H14
 LOCALE_SDATE = &H1D
 LOCALE_SDAYNAME1 = &H2A
 LOCALE_SDAYNAME2 = &H2B
 LOCALE_SDAYNAME3 = &H2C
 LOCALE_SDAYNAME4 = &H2D
 LOCALE_SDAYNAME5 = &H2E
 LOCALE_SDAYNAME6 = &H2F
 LOCALE_SDAYNAME7 = &H30
 LOCALE_SDECIMAL = &HE
 LOCALE_SENGCOUNTRY = &H1002
 LOCALE_SENGLANGUAGE = &H1001
 LOCALE_SGROUPING = &H10
 LOCALE_SINTLSYMBOL = &H15
 LOCALE_SLANGUAGE = &H2
 LOCALE_SLIST = &HC
 LOCALE_SLONGDATE = &H20
 LOCALE_SMONDECIMALSEP = &H16
 LOCALE_SMONGROUPING = &H18
 LOCALE_SMONTHNAME1 = &H38
 LOCALE_SMONTHNAME10 = &H41
 LOCALE_SMONTHNAME11 = &H42
 LOCALE_SMONTHNAME12 = &H43
 LOCALE_SMONTHNAME2 = &H39
 LOCALE_SMONTHNAME3 = &H3A
 LOCALE_SMONTHNAME4 = &H3B
 LOCALE_SMONTHNAME5 = &H3C
 LOCALE_SMONTHNAME6 = &H3D
 LOCALE_SMONTHNAME7 = &H3E
 LOCALE_SMONTHNAME8 = &H3F
 LOCALE_SMONTHNAME9 = &H40
 LOCALE_SMONTHOUSANDSEP = &H17
 LOCALE_SNATIVECTRYNAME = &H8
 LOCALE_SNATIVEDIGITS = &H13
 LOCALE_SNATIVELANGNAME = &H4
 LOCALE_SNEGATIVESIGN = &H51
 LOCALE_SPOSITIVESIGN = &H50
 LOCALE_SSHORTDATE = &H1F
 LOCALE_STHOUSAND = &HF
 LOCALE_STIME = &H1E
 LOCALE_STIMEFORMAT = &H1003
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 ******************

0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 6985017
please maintain

Questions Asked 12
Last 10 Grades Given B A A A A  
Question Grading Record 5 Answers Graded / 5 Answers Received
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 69

Expert Comment

by:Éric Moreau
ID: 7060650
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:
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

DO NOT ACCEPT THIS COMMENT AS AN ANSWER.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7061027
Just for clarification since my english is ugly than my code:
Question is regarding language support for tooltips not custom one, isn't it?
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 7061684
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).
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7063831
That's good to me.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7065791
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.

http://www.experts-exchange.com/jsp/memberProfile.jsp?mbr=bhatul&showQHistory=true

Moondancer - EE Moderator

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Visual Basic Excel Formatting error 4 83
Updates not working for MS Windows 7 12 153
VBA: Select SQL query based on a config Sheet v2 11 38
Add and format columns in vb6 7 47
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now