Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to localize msgbox?

Status
Not open for further replies.

xjazz

Programmer
Jan 11, 2005
21
US
I use resource file to localize my program.
but the caption of button in msgbox will still remain in English as "Yes", "No", "OK"...

how can I change those as well?

thanks
 
thanks you so much.
but there are three downloads.
1 for SP5, 1 for SP4, 1 for SP3.
I am using SP6, should I go ahead install the one for SP5 and try it? :(
 
I took a look
and tried.
but I don't think this is what I'm looking for.

thank you anyway
 
xjazz,

You've just hit the VB "wall". There are just some things that you just cannot do!

However, you could try the Windows API - I'd guess that will use the proper Windows internationalized strings set in Control Panel...

(...But note the use of the word "guess"...)

Try this code in a blank form...
Code:
Option Explicit

Const MB_DEFBUTTON1 = &H0&
Const MB_DEFBUTTON2 = &H100&
Const MB_DEFBUTTON3 = &H200&
Const MB_ICONASTERISK = &H40&
Const MB_ICONEXCLAMATION = &H30&
Const MB_ICONHAND = &H10&
Const MB_ICONINFORMATION = MB_ICONASTERISK
Const MB_ICONQUESTION = &H20&
Const MB_ICONSTOP = MB_ICONHAND
Const MB_OK = &H0&
Const MB_OKCANCEL = &H1&
Const MB_YESNO = &H4&
Const MB_YESNOCANCEL = &H3&
Const MB_ABORTRETRYIGNORE = &H2&
Const MB_RETRYCANCEL = &H5&
Private Declare Function MessageBox Lib "user32" Alias "MessageBoxA" (ByVal hwnd As Long, ByVal lpText As String, ByVal lpCaption As String, ByVal wType As Long) As Long


Private Sub Form_Load()
    MessageBox Me.hwnd, "My message", App.Title, MB_YESNOCANCEL
    MessageBox Me.hwnd, "My message", "My custom title", MB_ABORTRETRYIGNORE
    End
End Sub

If this works, you're away. That code was hacked about by an example from the KPD Team at ...Those guys rock!
 
>but there are three downloads

Well, actually not quite true., There are three download pages, but they actually each downloads exactly the same the same toolset - but with different instructions for each SP version. Downloading the SP5 'version', and following the instructions on the download page by substituting 'SP6' everytime you read 'SP5' works just fine.

>... don't think this is what I'm looking for

You are quite sure that neither PDWizLoc.exe nor VBLocal.exe do what you want?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top