Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Error Icon on custom form

Error Icon on custom form

Scheduled Pinned Locked Moved C#
questionhelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    theFrenchHornet
    wrote on last edited by
    #1

    How do I place the error icon on a custom form?

    K 1 Reply Last reply
    0
    • T theFrenchHornet

      How do I place the error icon on a custom form?

      K Offline
      K Offline
      kasik
      wrote on last edited by
      #2

      Not sure if this is what you're after, but you can get the standard error icon using the System.Drawing.SystemIcons.Error property. You could then draw this onto your custom form during its OnPaint method, or using a PictureBox (although this will probably render badly - removing the icons alpha channel - so your best bet is to draw it manually in OnPaint). Hope this helps :) Cheers, Will H

      T 1 Reply Last reply
      0
      • K kasik

        Not sure if this is what you're after, but you can get the standard error icon using the System.Drawing.SystemIcons.Error property. You could then draw this onto your custom form during its OnPaint method, or using a PictureBox (although this will probably render badly - removing the icons alpha channel - so your best bet is to draw it manually in OnPaint). Hope this helps :) Cheers, Will H

        T Offline
        T Offline
        theFrenchHornet
        wrote on last edited by
        #3

        Thanks so much, Will. You're right - using .Image of the PictureBox looks rough. The OnPaint looks better.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups