473,388 Members | 1,230 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,388 software developers and data experts.

messagebox icons

hi,

i am creating an app wich uses lots of messageboxes.

messagrbox.show("cheese", "is tasty");sets the message's title to cheese and
the text is "is tasty". how do i change the iocon for it e.g. warning (a red
exclamation mark)?

thanks in advance
--
Alvo von Cossel I of Germany
Nov 17 '05 #1
2 13939
Hi, Alvo!

Use another version of Show():

MessageBox.Show(
"cheese",
"is tasty",
MessageBoxButtons.Ok, // YesNo, YesNoCancel, etc.
MessageBoxIcon.Warning); // Exclamation, Asterisk, etc.

Regards - Octavio

"Alvo von Cossel I" <Al************@discussions.microsoft.com> escribió en
el mensaje news:8D**********************************@microsof t.com...
hi,

i am creating an app wich uses lots of messageboxes.

messagrbox.show("cheese", "is tasty");sets the message's title to cheese
and
the text is "is tasty". how do i change the iocon for it e.g. warning (a
red
exclamation mark)?

thanks in advance
--
Alvo von Cossel I of Germany

Nov 17 '05 #2
Hi Alvo,

Below is an example:

MessageBox.Show(
this, // needs a reference to the "Owner" form
"this is my text", // text to be shown in the message box
"this is the caption", // Title of the message box
MessageBoxButtons.OK, // Button to show
MessageBoxIcon.Warning); // Icon to show

MessageBox.Show() has several overloads, the one shown above gives you
the most flexibility, allowing you to pass in both the Buttons and the Icon.

Regards,

Bennie Haelen
Alvo von Cossel I wrote:
hi,

i am creating an app wich uses lots of messageboxes.

messagrbox.show("cheese", "is tasty");sets the message's title to cheese and
the text is "is tasty". how do i change the iocon for it e.g. warning (a red
exclamation mark)?

thanks in advance
--
Alvo von Cossel I of Germany

Nov 17 '05 #3

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

Similar topics

24
by: Crom | last post by:
Ok. I want to settle this once and for all. After looking at the source for various, rather sizeable (but not all were so big) web sites that use icons that show up in the addressbar beside the...
8
by: Dennis C. Drumm | last post by:
I have ordered the book .NET Framework Solutions, In Search of the Lost Win32 API by John Paul Meuller which I think will help answer some of my questions I have regarding making custom...
2
by: Dennis C. Drumm | last post by:
This is a restatement of an earlier post that evidently wasn't clear. I am building a custom MessageBox dialog that has, among other things, a few new button options (yes to all, no to all, etc.)...
1
by: Jean Bredeche | last post by:
Hi: I am trying to create customized confirmation/error/etc dialogs in my application. Up to now we've been using MessageBox.Show and passing it the various necessary flags (buttons, icons,...
6
by: B-Dog | last post by:
Does anyone know where I can find some professional looking icons that are the standard windows collection for developers? The ones that came on the VS cd are pretty lame. Thanks
17
by: Brett | last post by:
I'd like references on where to find some good (quality) icons to use for form and application icons (for the EXE). Most of the free stuff isn't that great looking and there isn't a good...
2
by: SharpCoderMP | last post by:
i'm trying to embed multiple program icons in my executable. the only way so far i managed to do that is to embed native win32 resource file with multiple icons. it works, but... when i create a...
6
by: Frank Rizzo | last post by:
I am trying to programmatically close a messagebox. I don't see any obvious managed choices. Back in the day, I remember using a combination of FindWindow and EndDialog apis(...
4
by: Sanoski | last post by:
This might be a dumb question. I don't know. I'm new to all this. How do you find icons for your programs? All GUI applications have cool icons that represent various things. For instance, to save...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.