473,324 Members | 2,179 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,324 software developers and data experts.

Q: Message Box graphics

Hi

I was wondering if anybody could tell me how to find the graphics used in
such things as

MessageBoxIcon.Warning and MessageBoxIcon.Information

The reason is that I'm writing my own customised messages for an applicatio
i.e. not using MessageBox but I'd still like to use the same Windows
graphics. I'm using XP professional by the way.

Thanks in advance

Geoff
Feb 9 '06 #1
12 1385

"Geoff" <no********@email.com> kirjoitti
viestissä:9d********************@pipex.net...
Hi

I was wondering if anybody could tell me how to find the graphics used in
such things as

MessageBoxIcon.Warning and MessageBoxIcon.Information

The reason is that I'm writing my own customised messages for an
applicatio i.e. not using MessageBox but I'd still like to use the same
Windows graphics. I'm using XP professional by the way.

Take a look at System.Drawing.SystemIcons. You'll find those icons there.

Teemu

Feb 9 '06 #2
"Geoff" <no********@email.com> schrieb:
I was wondering if anybody could tell me how to find the graphics used in
such things as

MessageBoxIcon.Warning and MessageBoxIcon.Information


Check out 'SystemIcons'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 9 '06 #3
Hi guys

Yes, that works, however there is a black edge around the icon. I'm putting
a PictureBox on the form (which has itself a bitmap background) and in the
load event using:

PictureBox1.SystemIcons.Information.ToBitmap

Can you suggest how I could get rid of the edge?

Geoff

"Teemu" <ts*****@hotmail.com> wrote in message
news:ds**********@phys-news4.kolumbus.fi...

"Geoff" <no********@email.com> kirjoitti
viestissä:9d********************@pipex.net...
Hi

I was wondering if anybody could tell me how to find the graphics used in
such things as

MessageBoxIcon.Warning and MessageBoxIcon.Information

The reason is that I'm writing my own customised messages for an
applicatio i.e. not using MessageBox but I'd still like to use the same
Windows graphics. I'm using XP professional by the way.

Take a look at System.Drawing.SystemIcons. You'll find those icons there.

Teemu

Feb 9 '06 #4
> PictureBox1.SystemIcons.Information.ToBitmap

Can you suggest how I could get rid of the edge?


I tried:

PictureBox1.Image = Drawing.SystemIcons.Warning.ToBitmap

and wasn't able to see any edges. Have you tried this?

-Teemu
Feb 9 '06 #5
It isn't as prominent using "Warning" but still there. Is there a way I can
find the icon files in the Windows folder?

Geoff

"Teemu" <ts*****@hotmail.com> wrote in message
news:ds**********@phys-news4.kolumbus.fi...
PictureBox1.SystemIcons.Information.ToBitmap

Can you suggest how I could get rid of the edge?


I tried:

PictureBox1.Image = Drawing.SystemIcons.Warning.ToBitmap

and wasn't able to see any edges. Have you tried this?

-Teemu

Feb 9 '06 #6

"Geoff" <no********@email.com> kirjoitti
viestissä:KI******************************@pipex.n et...
It isn't as prominent using "Warning" but still there. Is there a way I
can find the icon files in the Windows folder?


I tested this more. I created following code:

Form1.BackgroundImage = New Bitmap("c:\MyImage.jpg")
PictureBox1.BackColor = Color.Transparent
PictureBox1.SizeMode = PictureBoxSizeMode.AutoSize
PictureBox1.Image = Drawing.SystemIcons.Information.ToBitmap

Information icon rendered very nicely without any edges or other borders.
Hopefully you get it work now. I can't see any reason why it would behave
differently with you. Are you using Visual Basic 2005?

Teemu

Feb 9 '06 #7
CMM
"Geoff" <no********@email.com> wrote in message
news:KI******************************@pipex.net...
It isn't as prominent using "Warning" but still there. Is there a way I
can find the icon files in the Windows folder?


Check in Shell32.dll and Explorer.exe. They're in there. You can browse and
extract (save as .ICO) the icons (and other resources) of these exe and
dll's in Visual Studio using File | Open File.

--
-C. Moya
www.cmoya.com
Feb 9 '06 #8
Hi Teemu

No, I'm using 2003. Thanks for the code. I'll give it a try.

Geoff

"Teemu" <ts*****@hotmail.com> wrote in message
news:ds**********@phys-news4.kolumbus.fi...

"Geoff" <no********@email.com> kirjoitti
viestissä:KI******************************@pipex.n et...
It isn't as prominent using "Warning" but still there. Is there a way I
can find the icon files in the Windows folder?


I tested this more. I created following code:

Form1.BackgroundImage = New Bitmap("c:\MyImage.jpg")
PictureBox1.BackColor = Color.Transparent
PictureBox1.SizeMode = PictureBoxSizeMode.AutoSize
PictureBox1.Image = Drawing.SystemIcons.Information.ToBitmap

Information icon rendered very nicely without any edges or other borders.
Hopefully you get it work now. I can't see any reason why it would behave
differently with you. Are you using Visual Basic 2005?

Teemu

Feb 9 '06 #9
Thanks CMM

"CMM" <cm*@nospam.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
"Geoff" <no********@email.com> wrote in message
news:KI******************************@pipex.net...
It isn't as prominent using "Warning" but still there. Is there a way I
can find the icon files in the Windows folder?


Check in Shell32.dll and Explorer.exe. They're in there. You can browse
and extract (save as .ICO) the icons (and other resources) of these exe
and dll's in Visual Studio using File | Open File.

--
-C. Moya
www.cmoya.com

Feb 9 '06 #10
"Geoff" <no********@email.com> schrieb:
Yes, that works, however there is a black edge around the icon. I'm
putting a PictureBox on the form (which has itself a bitmap background)
and in the load event using:

PictureBox1.SystemIcons.Information.ToBitmap

Can you suggest how I could get rid of the edge?


<URL:http://www.dotnetrix.co.uk/misc.html>
-> "Get Alpha Bitmap from 32 bit Icon."

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 9 '06 #11
Thanks Herfried. That worked a treat!

Geoff

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
"Geoff" <no********@email.com> schrieb:
Yes, that works, however there is a black edge around the icon. I'm
putting a PictureBox on the form (which has itself a bitmap background)
and in the load event using:

PictureBox1.SystemIcons.Information.ToBitmap

Can you suggest how I could get rid of the edge?


<URL:http://www.dotnetrix.co.uk/misc.html>
-> "Get Alpha Bitmap from 32 bit Icon."

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Feb 10 '06 #12
I have written my own MessageBox replacement. See it in my article of
January 2006 at http://emoreau.s2i.com/

--
HTH

Éric Moreau, MCSD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Concept S2i inc. (www.s2i.com)
http://emoreau.s2i.com/

"Geoff" <no********@email.com> wrote in message
news:9d********************@pipex.net...
Hi

I was wondering if anybody could tell me how to find the graphics used in
such things as

MessageBoxIcon.Warning and MessageBoxIcon.Information

The reason is that I'm writing my own customised messages for an
applicatio i.e. not using MessageBox but I'd still like to use the same
Windows graphics. I'm using XP professional by the way.

Thanks in advance

Geoff

Feb 11 '06 #13

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

Similar topics

21
by: BlackHawke | last post by:
My name is Nick Soutter, I own a small game development company (www.aepoxgames.net) making our first game (www.andromedaonline.net) in java. I am writing because we are having a very...
2
by: JBiagio | last post by:
Hello All, I am attempting to learn a bit about the GDI+ transforms and charting data and I feel like I'm getting a handle on how the transforms work. My chart object has a large "canvas" bitmap...
5
by: Charles A. Lackman | last post by:
Hello, I have created a complete PrintDocument and need to create an image from it. How is this done? e.Graphics.SmoothingMode = Drawing2D.SmoothingMode.HighQuality...
6
by: Chris Dunaway | last post by:
The method for printing documents in .Net can be confusing, especially for newer users. I would like to create a way to simplify this process. My idea would be implemented using a PrintDocument...
0
by: Hasim AH | last post by:
Hi .. Just getting interested to learn C# and needs help. I want to write C# application so that the program will execute and draw graphics when the user select the drawing menu from the main...
12
by: Xah Lee | last post by:
Of Interest: Introduction to 3D Graphics Programing http://xahlee.org/3d/index.html Currently, this introduction introduces you to the graphics format of Mathematica, and two Java Applet...
2
by: _A_C-ker_ | last post by:
Hello geek(s), I'm in desperate need of graphics programming using C language. Does anyone have material or web-links that explain graphics programming in- detail? I would appreciate your help...
1
by: Ringo | last post by:
I need some help. I have an app that talks to a sonar board via the serial port. In my sp_DataReceived I gather all the data and put it into arrays. Then I want to draw the data in a pictureBox. I...
8
by: Abhiraj Chauhan | last post by:
I need someone to make an example of how to create a graphics window in VB.net 2008. I understand the basics of how to draw a rectangle and lines etc. What I need is an example of how to make a...
10
by: eddie tan | last post by:
Hi, I have a picturebox with graphics drawn from different objects. In one object I used Pen P1; P1 = new Pen(Color.Blue, 3); Graphics g = null; g = Graphics.FromImage(image.Image);...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.