473,582 Members | 3,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Q: Modify text on buttons in the MessageBox, possible?

Hi!

Is it possible to modify the text in the MessageBox class?

There are a couple of buttons with a standard text. What i want is to set a
text of my own.

I have inherited the class, but there are no suitable methods to override
for handeling this.

Is there a base class that i need to alter?

Regards
Martin Arvidsson
Nov 23 '05 #1
2 1893
Hello,

Sorry, but I don't think you can. However, you CAN create your own dialogs.
Simply create a standard form. Add two buttons (OK & Cancel) set the
DialogResult property for theese buttons, set the Form.AcceptButt on and
Form.CancelButt on to theese buttons, change the Form.BorderStyl e to
FixedDialog, remove the MaximizeBox and MinimizeBox. Use the
Form.ShowDialog () method as such:
if (new myDialog().Show Dialog() == DialogResult.OK ) {
// accept button
}

Now you should have a perfectly looking CUSTOM dialogbox :)

"Visual Systems AB (Martin Arvidsson)" wrote:
Hi!

Is it possible to modify the text in the MessageBox class?

There are a couple of buttons with a standard text. What i want is to set a
text of my own.

I have inherited the class, but there are no suitable methods to override
for handeling this.

Is there a base class that i need to alter?

Regards
Martin Arvidsson

Nov 23 '05 #2
See http://www.codeproject.com/Purgatory/messageboxhook.asp

--
HTH

Éric Moreau, MCSD, Visual Developer - Visual Basic MVP
(http://aspnet2.com/mvp.ashx?EricMoreau)
Conseiller Principal / Senior Consultant
Concept S2i inc. (www.s2i.com)
http://pages.videotron.com/emoreau/

"Visual Systems AB (Martin Arvidsson)" <ma************ **@vsab.net> wrote in
message news:ei******** ******@TK2MSFTN GP12.phx.gbl...
Hi!

Is it possible to modify the text in the MessageBox class?

There are a couple of buttons with a standard text. What i want is to set
a text of my own.

I have inherited the class, but there are no suitable methods to override
for handeling this.

Is there a base class that i need to alter?

Regards
Martin Arvidsson

Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7189
by: Richard | last post by:
Hello everyone! Is it possible to create 2 columns of text using XSL-FO and FOP (or any other XSL-FO to PDF generator)? I want the function similar to 'fo:block' but in 2 columns, so if the text is long it continous on the 2nd column or on the next page. Let me show the function with an example: Page 1 -----------------------
2
2179
by: Juan Garcia | last post by:
Subject says it all. Given: Window A with text field. Window B with a button (onClick opens Window C) Window C with a button (onClick I want it to modify text fields of Window A) I have tried storing the handle of Window A ( var winHandle = this; ) in a global variable/file ( globals.js ) and then accessing it from
2
2972
by: Irene | last post by:
Hi, I would like to modify the text within an html title tag based upon a value read from the registry (or the existence of a certain file). For example, if a certain registry value is equal to 1 then the title should be <title>blah blah App1</title> otherwise the title should be <title>blah blah App2</title>. Could someone recommend a...
3
464
by: Job Lot | last post by:
How can I modify values in text file? File is tab delimited as follows Date Buy Sell 13-Jan-2005 0.9970776 0.9901224 18-Jan-2005 0.9910566 0.9841434 I want to modify Buy and Sell values for a particular Date. Thanks
16
2876
by: Philippe C. Martin | last post by:
Hi, I am trying to change the data in a form field from python. The following code does not crash but has no effect as if "form" is just a copy of the original html form. Must I recreate the form order to do that ? My point is for the client to be able to re-read the modified data.
1
1859
by: David Housman | last post by:
Hello, The effect i'm trying for: Tha tthe user clicks an image, and a line of text on the page changes. I'd like to make it so that this could be done over and over with different links. But this isn't working. I think the problem is related to a refresh not happening, but I'm just learning the javascript ropes. Thanks in advance for...
1
1328
by: rmkumar | last post by:
hi to all recently i have started working with VC++. i'm strugling with concept to make STRING work as button. How to convert or configure or create text which work as button?
3
1938
by: TonyJ | last post by:
Hello! I supposed to modify some text files. In the file(s) which consist of different section. In one section you might have Path = <Installation_path>. The program will then replace the text string Installation_path with the path that was chosen in the installation program. An example could be this string <Installation_pathwould be...
3
5170
by: mikewin86 | last post by:
Hello, I would like to know how to change the text on the messagebox buttons. For example, Yes and No buttons to Do and Don't etc. Thanks in advance
0
7809
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8159
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8183
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5685
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3809
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3835
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2312
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1413
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1147
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.