Q: Message Box graphics

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Geoff

    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


  • Teemu

    #2
    Re: Message Box graphics


    "Geoff" <nodamnspam@ema il.com> kirjoitti
    viestissä:9dCdn Rg5BdXP_XbeRVny 3g@pipex.net...[color=blue]
    > 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.[/color]


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

    Teemu

    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: Message Box graphics

      "Geoff" <nodamnspam@ema il.com> schrieb:[color=blue]
      > I was wondering if anybody could tell me how to find the graphics used in
      > such things as
      >
      > MessageBoxIcon. Warning and MessageBoxIcon. Information[/color]

      Check out 'SystemIcons'.

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

      Comment

      • Geoff

        #4
        Re: Message Box graphics

        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.Sys temIcons.Inform ation.ToBitmap

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

        Geoff

        "Teemu" <tsirkia@hotmai l.com> wrote in message
        news:dsfne4$dva $1@phys-news4.kolumbus. fi...[color=blue]
        >
        > "Geoff" <nodamnspam@ema il.com> kirjoitti
        > viestissä:9dCdn Rg5BdXP_XbeRVny 3g@pipex.net...[color=green]
        >> 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.[/color]
        >
        >
        > Take a look at System.Drawing. SystemIcons. You'll find those icons there.
        >
        > Teemu[/color]


        Comment

        • Teemu

          #5
          Re: Message Box graphics

          > PictureBox1.Sys temIcons.Inform ation.ToBitmap[color=blue]
          >
          > Can you suggest how I could get rid of the edge?[/color]

          I tried:

          PictureBox1.Ima ge = Drawing.SystemI cons.Warning.To Bitmap

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

          -Teemu

          Comment

          • Geoff

            #6
            Re: Message Box graphics

            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" <tsirkia@hotmai l.com> wrote in message
            news:dsg16a$9oi $1@phys-news4.kolumbus. fi...[color=blue][color=green]
            >> PictureBox1.Sys temIcons.Inform ation.ToBitmap
            >>
            >> Can you suggest how I could get rid of the edge?[/color]
            >
            > I tried:
            >
            > PictureBox1.Ima ge = Drawing.SystemI cons.Warning.To Bitmap
            >
            > and wasn't able to see any edges. Have you tried this?
            >
            > -Teemu[/color]


            Comment

            • Teemu

              #7
              Re: Message Box graphics


              "Geoff" <nodamnspam@ema il.com> kirjoitti
              viestissä:KIadn ZPrXYoCC3benZ2d nUVZ8t2dnZ2d@pi pex.net...[color=blue]
              > It isn't as prominent using "Warning" but still there. Is there a way I
              > can find the icon files in the Windows folder?[/color]

              I tested this more. I created following code:

              Form1.Backgroun dImage = New Bitmap("c:\MyIm age.jpg")
              PictureBox1.Bac kColor = Color.Transpare nt
              PictureBox1.Siz eMode = PictureBoxSizeM ode.AutoSize
              PictureBox1.Ima ge = Drawing.SystemI cons.Informatio n.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

              Comment

              • CMM

                #8
                Re: Message Box graphics

                "Geoff" <nodamnspam@ema il.com> wrote in message
                news:KIadnZPrXY oCC3benZ2dnUVZ8 t2dnZ2d@pipex.n et...[color=blue]
                > It isn't as prominent using "Warning" but still there. Is there a way I
                > can find the icon files in the Windows folder?[/color]

                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



                Comment

                • Geoff

                  #9
                  Re: Message Box graphics

                  Hi Teemu

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

                  Geoff

                  "Teemu" <tsirkia@hotmai l.com> wrote in message
                  news:dsg6c0$ert $1@phys-news4.kolumbus. fi...[color=blue]
                  >
                  > "Geoff" <nodamnspam@ema il.com> kirjoitti
                  > viestissä:KIadn ZPrXYoCC3benZ2d nUVZ8t2dnZ2d@pi pex.net...[color=green]
                  >> It isn't as prominent using "Warning" but still there. Is there a way I
                  >> can find the icon files in the Windows folder?[/color]
                  >
                  > I tested this more. I created following code:
                  >
                  > Form1.Backgroun dImage = New Bitmap("c:\MyIm age.jpg")
                  > PictureBox1.Bac kColor = Color.Transpare nt
                  > PictureBox1.Siz eMode = PictureBoxSizeM ode.AutoSize
                  > PictureBox1.Ima ge = Drawing.SystemI cons.Informatio n.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[/color]


                  Comment

                  • Geoff

                    #10
                    Re: Message Box graphics

                    Thanks CMM

                    "CMM" <cmm@nospam.com > wrote in message
                    news:%232pPTTbL GHA.3944@tk2msf tngp13.phx.gbl. ..[color=blue]
                    > "Geoff" <nodamnspam@ema il.com> wrote in message
                    > news:KIadnZPrXY oCC3benZ2dnUVZ8 t2dnZ2d@pipex.n et...[color=green]
                    >> It isn't as prominent using "Warning" but still there. Is there a way I
                    >> can find the icon files in the Windows folder?[/color]
                    >
                    > 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
                    >[/color]


                    Comment

                    • Herfried K. Wagner [MVP]

                      #11
                      Re: Message Box graphics

                      "Geoff" <nodamnspam@ema il.com> schrieb:[color=blue]
                      > 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.Sys temIcons.Inform ation.ToBitmap
                      >
                      > Can you suggest how I could get rid of the edge?[/color]

                      <URL:http://www.dotnetrix.c o.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/>

                      Comment

                      • Geoff

                        #12
                        Re: Message Box graphics

                        Thanks Herfried. That worked a treat!

                        Geoff

                        "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
                        news:%23AoM4$cL GHA.2064@TK2MSF TNGP09.phx.gbl. ..[color=blue]
                        > "Geoff" <nodamnspam@ema il.com> schrieb:[color=green]
                        >> 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.Sys temIcons.Inform ation.ToBitmap
                        >>
                        >> Can you suggest how I could get rid of the edge?[/color]
                        >
                        > <URL:http://www.dotnetrix.c o.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/>[/color]


                        Comment

                        • Eric Moreau

                          #13
                          Re: Message Box graphics

                          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)


                          "Geoff" <nodamnspam@ema il.com> wrote in message
                          news:9dCdnRg5Bd XP_XbeRVny3g@pi pex.net...[color=blue]
                          > 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
                          >
                          >[/color]


                          Comment

                          Working...