Click here to Skip to main content
12,450,977 members (23,490 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#
Hello guys,

My question is really simple I want to change the text on messagebox buttons to something else

for example I want to make 'yes' button say 'sure'

can I do this ?

I did google this some while ago and I remember I couldnt find anything helpful so if somebody get me a google result it will be Embarrassing Smile | :)


thanks in advance
Smile | :)
Posted 13-Apr-11 22:18pm
a1mimo1.7K
Comments
Tarun.K.S 14-Apr-11 4:24am
   
I am not sure whether that's possible but you can make a custom window for it.
SAKryukov 14-Apr-11 22:51pm
   
That would much more appropriate thing to do (not for the novice by the way), compared to the method based on Hook, even though it's quite creative.
--SA
a1mimo 14-Apr-11 4:32am
   
I know that, but its just I am too lazy and curious about it :-)
Thank you,
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

It is indeed possible.
There is a ready made class for this, here on CodeProject.
Just use the CodeProject Search feature!
Good luck!

If you really can't find it... try here: Localizing System MessageBox[^]
  Permalink  
v2
Comments
a1mimo 14-Apr-11 5:01am
   
Thank you Toli
I actually tried your advice and I was just reading it, you are a big help :-)
Tarun.K.S 14-Apr-11 5:56am
   
Wow so it works!
girish sp 14-Apr-11 7:04am
   
toli-i thought its not possible..easy way to do..good answer!!my 5
SAKryukov 14-Apr-11 22:49pm
   
Great article (my 5 for the reference), great illustration of "Windows must die". Created absolutely inflexible MessageBox, but the Hook beats it.
--SA
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

I believe calling Win32 API is only one way how to achieve this. If I remember correctly this could be done by using SendMessage API function. But it needs to know handle of the "window"(button) intended for caption change.
  Permalink  
Comments
a1mimo 14-Apr-11 4:34am
   
can you suggest me an article or something to do so? I would appreciate this
Thank you,
Rampas Tomas 14-Apr-11 4:39am
   
I found it just 2 clicks from here :)

http://www.codeproject.com/KB/cpp/dMsgBox.aspx
a1mimo 14-Apr-11 5:00am
   
Thanks Rampas
I got it I appreciate your help :-)
girish sp 14-Apr-11 7:04am
   
my 5!!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160826.1 | Last Updated 14 Apr 2011
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100