Re: ToolBox Bitmap

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Bob (Bob_at_discussions.microsoft.com)
Date: 07/21/04


Date: Wed, 21 Jul 2004 07:04:02 -0700

Ok. Did that for both controls(removed the resource file and added both bitmaps (as embedded)), but I'm still getting the default bitmaps. Here's the actual code for one of the controls:
  <ToolboxBitmap(GetType(SelectionListBox), "SelectionListBox.bmp")> _
   Public Class SelectionListBox

"Ken Tucker [MVP]" wrote:

> Hi,
>
> Instead of placing the bitmaps in a resource file add them to the
> solution. Set there build action to embedded resource.
>
> <ToolBoxBitMap(GetType(CTRL_1),"One.bmp")> _
> Class CTRL_1
> .... code...
> End Class
>
> Ken
> ----------------
>
> "Bob" <Bob@discussions.microsoft.com> wrote in message
> news:1301EB8C-4241-4A4B-B4C6-C5EFB2B718F6@microsoft.com...
> I have two BMP's (One.bmp and two.bmp) that I've placed in a resource file
> (MyControls.resource) using the resource editor. I've got two custom
> controls (CTRL_1 and CTRL_2) and I want the icons to show in the toolbox. I
> tried something like:
>
> <ToolBoxBitMap(GetType(CTRL_1),"one")> _
> Class CTRL_1
> .... code...
> End Class
>
> I also used similar code for the other control, but when the controls are
> added to the toolbox, only the default icons are displayed. How do I get
> the desired results?
>
>
>



Relevant Pages

  • Re: How to load bitmaps from a resource file?
    ... I created a resource file in Visual C++ 6.0 that contains 3 bitmaps. ... Function GetImageAs String ... Dim sImage As String ...
    (microsoft.public.vb.controls)
  • Adding icons in resource file
    ... Is there such a thing as storing icons or bitmaps into a resource ... I want to store a bunch of icons into a resource file, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Paperclip-icon in preview pane disappeared
    ... >>presenting the icon. ... >>In case the problem is instead just in the resource file ... > The number of the bitmaps fit to the numbers posted by ... The bitmaps aren't corrupt and everything seems to be ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Add my own bitmaps into a resource file?
    ... I want to use a resource file to load my own bitmaps. ... I have the version 3.0 Image editor. ... I've managed to do it by creating a new bmp to the size of my original then ...
    (comp.lang.pascal.delphi.misc)
  • Add my own bitmaps into a resource file?
    ... I want to use a resource file to load my own bitmaps. ... using loadfromfile but want to get away from that. ...
    (comp.lang.pascal.delphi.misc)