Windows Develop Bookmark and Share   
 index > Windows Forms General > Messagebox
 

Messagebox

hi

Is there anyway so my "messagebox.show" buttons will be in different language??

meaning instead of "Yes/No" ???

BilalShouman  Monday, October 02, 2006 7:26 PM

BilalShouman wrote:
Dave said :"Try changing your applications default language setting in the project properties."

Where I can do this , Im using vb.net 2003

Put this code before Application.Run(); in main function and its for German language you can try to change the argument as you need it to be:

CultureInfo ci = new CultureInfo("de-DE");

System.Threading.Thread.CurrentThread.CurrentCulture = ci;

System.Threading.Thread.CurrentThread.CurrentUICulture = ci;

Cheers ;-)

RizwanSharp  Monday, October 02, 2006 11:06 PM
It should show up in a different language depending on what language is chosen in the OS.
AndrewVos  Monday, October 02, 2006 7:46 PM
Hmmm, there isn't a direct way to do that, however, you can create your own MessageBox simply!
Moayad Mardini  Monday, October 02, 2006 7:48 PM
Even if i changes settings in OS??
BilalShouman  Monday, October 02, 2006 8:17 PM

BilalShouman wrote:
Even if i changes settings in OS??

That should work.

AndrewVos  Monday, October 02, 2006 8:23 PM

I tried it now it didnt work

BilalShouman  Monday, October 02, 2006 8:27 PM
Try changing your applications default language setting in the project properties.
Ðãvę Âņđęŕŝőŋ1  Monday, October 02, 2006 10:27 PM

Where I can do that??
Im using vb.net 2003

Thank you

BilalShouman  Monday, October 02, 2006 10:53 PM

No! Its dependent on OS, if you need to customize them yourself you can create your own with a Form.

Best Regards,

RizwanSharp  Monday, October 02, 2006 10:54 PM
Dave said :"Try changing your applications default language setting in the project properties."

Where I can do this , Im using vb.net 2003
BilalShouman  Monday, October 02, 2006 10:57 PM

BilalShouman wrote:
Dave said :"Try changing your applications default language setting in the project properties."

Where I can do this , Im using vb.net 2003

Put this code before Application.Run(); in main function and its for German language you can try to change the argument as you need it to be:

CultureInfo ci = new CultureInfo("de-DE");

System.Threading.Thread.CurrentThread.CurrentCulture = ci;

System.Threading.Thread.CurrentThread.CurrentUICulture = ci;

Cheers ;-)

RizwanSharp  Monday, October 02, 2006 11:06 PM

Thank you for your reply

but it didnt work

Public Sub main()
Dim ci As New System.globalization.CultureInfo("de-DE")
System.Threading.Thread.CurrentThread.CurrentCulture = ci
System.Threading.Thread.CurrentThread.CurrentUICulture = ci

Dim
frmMain As New Main
frmMain.Show()
Application.Run()

End Sub

BilalShouman  Monday, October 02, 2006 11:17 PM

How did you know this did not work? Try to localize some Form and show it and then see does it show localised version of default english version. Forget about the message box problem right now and make sure language is changed.....

I catch you back within 15 minutes...

Best Regards,

RizwanSharp  Monday, October 02, 2006 11:21 PM

It worked for the form,label buttons...

I need it for message box???

how can I do that??

Thanks

BilalShouman  Monday, October 02, 2006 11:45 PM

Try some other culture if doesnot help then suppose its OS dependant, Try to run your application on some OS version which is not English (Its ultimate Solution!)

For testing you can create your own MessageBoxes as all have suggested! and for commercial use u can replace all Custom Message Boxes with original MessageBox!

Best Regards,

RizwanSharp  Monday, October 02, 2006 11:52 PM

You can use google to search for other answers

Custom Search

More Threads

• Print the Form ... Not image
• Misadventures in Printing
• how to put my application on start up in deployment project
• Problem transferring an image to external application using the clipboard.
• C# Safe handle has been closed
• Smooth Edge Form VB.NET
• Graphics does not draw using correct coordinates
• Timer not disposed
• DataGridView - Position editing control?
• Slow User Defined Control