Results 1 to 2 of 2

Thread: VB.net/c# HowTo add bitmap's to your user controls

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2003
    Posts
    1,489

    VB.net/c# HowTo add bitmap's to your user controls

    If you've ever created a user control, particularly an inherited control, you've noticed that the icon to the left of your new control in the toolbox is simply a gear. With the below code, you can add the icon from an existing control:

    VB Code:
    1. <ToolboxBitmap(GetType(System.Windows.Forms.TextBox))> _
    2. Public Class TextBox
    3.     Inherits System.Windows.Forms.TextBox
    4.  
    5. End Class
    or in C#
    VB Code:
    1. [ToolboxBitmap(typeof(Button))]
    2. class MyControl1 : UserControl
    3. {
    4. }
    more information can be found Here
    Last edited by Andy; Apr 28th, 2005 at 02:15 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width