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. ToolboxBitmap Icon

ToolboxBitmap Icon

Scheduled Pinned Locked Moved C#
question
2 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
    The_Soul_Of_Rock
    wrote on last edited by
    #1

    [ToolboxBitmap(typeof(myNamesapce.myControl), "myNamespace.FlatComboBox.bmp"] How can i change the icon defaul of the custom control Thanks Rock Throught The Night

    H 1 Reply Last reply
    0
    • T The_Soul_Of_Rock

      [ToolboxBitmap(typeof(myNamesapce.myControl), "myNamespace.FlatComboBox.bmp"] How can i change the icon defaul of the custom control Thanks Rock Throught The Night

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      You might start by reading about the ToolboxBitmapAttribute. The reason you include the Type is to provide a namespace in order to resolve the bitmap. Just attribute your control with:

      [ToolboxBitmap(typeof(myNamespace.myControl), "FlatComboBox.bmp")]

      "myNamespace" is grabbed from the Type and prepends the filename to find the embedded resource. Make sure you change the Build Action in VS.NET for the "FlatComboBox.bmp" to "Embedded Resource" and that it is contained in your project with the root namespace set to "myNamespace", or in a folder which is used to generate the namespace for embedded resources (and used for the default namespace for new source files, although you can change it).

      Microsoft MVP, Visual C# My Articles

      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