473,699 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 13959
Hi, Alvo!

Use another version of Show():

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

Regards - Octavio

"Alvo von Cossel I" <Al************ @discussions.mi crosoft.com> escribió en
el mensaje news:8D******** *************** ***********@mic rosoft.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
MessageBoxButto ns.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
3805
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 address itself. Just about all websites that use said icons use one of these two methods (some use both even) to make them appear (in the code of a webpage.) : <LINK REL="icon" HREF="/icon.ico" TYPE="image/ico"> <LINK REL="SHORTCUT ICON"...
8
13105
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 MessageBoxes, but that isn't going to be here for a few days. So, I thought I would ask you guys how to put one of hte standard MessageBox icons, such as MessageBoxIcon.Exclamation, into my custom MessageBox. Thanks,
2
30150
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.) and would like to make the dialog look and act like the standard MessageBox. Therefore, I would like to put in the message section the same type of icons found in the MessageBox dialog, such as MessageBoxIcon.Exclamation. In another post here I had...
1
4148
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, etc). By "customized", I mean I want complete control over the color of the messagebox, the position/color/size of the buttons, etc. Do I need to create a custom form from scratch, or is there a way to subclass MessageBox? (I'm guessing I need to...
6
2361
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
14681
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 selection. A site offering previews of icons or purchase of a single icon would be nice. Thanks, Brett
2
3441
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 native win32 resource file with the VS 2005 and put there my icons, VS always converts some of the 32bit icons into 24bit - so i loose alpha blending what makes my icons look ugly. I did an experiment and created a icon file with full range of...
6
21548
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( http://msdn2.microsoft.com/en-us/library/ms645472.aspx ), but how can I ensure that the dialog that I am destroying actually belongs to my application? Thanks.
4
2452
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 is often represented as a disk, etc. You know, the small little picture references that give meaning to the phrase 'Graphical User Interface'. But I'm not a graphics artist! Drawing is simply one talent that skipped me completely. Where can I...
0
8689
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8618
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9178
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9035
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8885
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6534
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5875
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4376
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2348
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.