Solved

How to change font of ToolTip

Posted on 2002-04-21
9
237 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
Comment Utility
Custom ToolTips Dll (Version 2.0)
http://www.freevbcode.com/ShowCode.Asp?ID=1232



hongjun
0
 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
Comment Utility
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
Comment Utility
please maintain

Questions Asked 12
Last 10 Grades Given B A A A A  
Question Grading Record 5 Answers Graded / 5 Answers Received
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 69

Expert Comment

by:Éric Moreau
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
That's good to me.
0
 
LVL 1

Expert Comment

by:Moondancer
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

771 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