473,387 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 1884
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.AcceptButton and
Form.CancelButton to theese buttons, change the Form.BorderStyle to
FixedDialog, remove the MaximizeBox and MinimizeBox. Use the
Form.ShowDialog() method as such:
if (new myDialog().ShowDialog() == 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**************@TK2MSFTNGP12.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
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...
2
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...
2
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...
3
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...
16
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...
1
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...
1
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
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...
3
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.