无法获取< ToolboxBitmap>上班! [英] Can't get <ToolboxBitmap> to work!

查看:81
本文介绍了无法获取< ToolboxBitmap>上班!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(第二次发帖尝试)


我经历了大量的旧帖子,几个网站,书籍,甚至还试图咨询心理学家但是b $ b什么都没有产生majik答案。我是一个在Win2K系统上使用VB''05 Express的



该项目将所有内容分组在各种目录下。解决方案

资源管理器看起来像......


AProject

- 我的项目

- -classes

---- AClass.vb

- 格式

---- AForm.vb

- 资源

---- AClass.bmp


如果你还没有猜到它我试图让AClass.bmp到是

AClass类的工具箱图标而不是默认齿轮。

类的缩写版本看起来像......


命名空间AProject

< ToolboxBitmap(GetType(AProject。 AClass),AClass)_

公共类AClass

继承System.Windows.Forms.TextBox

''属性,方法,和事件剪辑

结束班级

结束命名空间


位图是15x15 16色。 (文档说16x16,专家网站说

16x15或15x16但是如果这是逐个宽度或者

宽度高,那么就不用说了我采用了最低的共同点。)构建操作

设置为嵌入式资源。


该文件列在项目的资源和持久性设置为

在编译时链接。


我在第二个参数上尝试了几个字符串值的排列

位置包括......


AProject.Resources.AClass(w /和w / o" .bmp")

Resources.AClass(w /和w / o" .bmp")

AProject.AClass(w /和w / o" .bmp")

AClass(w / and w / o.bmp)


我已经尝试将BMP重新定位到项目的根目录和/或

classes目录。 br />

我已经尝试了一个完全合格的路径和文件名。


我试过了除了电击治疗之外的其他事情我很认真

今天考虑到这个选项。


我做错了什么(除了浪费时间在这上面)非常简单

问题)?

解决方案

< ToolboxBitmap(GetType(AProject.AClass)," AProject.AClass .bmp")>


" MyndPhlyp" < no **** @ homeright.nowwrote in message

news:uY ************** @ TK2MSFTNGP04.phx.gbl ...


(第二次发布尝试)


我经历了大量的旧帖子,几个网站,书籍和

甚至

尝试咨询一个通灵者,但没有任何东西正在产生majik答案。我是一个在Win2K系统上使用VB''05 Express的



该项目将所有内容分组在各种目录下。解决方案

资源管理器看起来像......


AProject

- 我的项目

- -classes

---- AClass.vb

- 格式

---- AForm.vb

- 资源

---- AClass.bmp


如果你还没有猜到它我试图让AClass.bmp到是

AClass类的工具箱图标而不是默认齿轮。

类的缩写版本看起来像......


命名空间AProject

< ToolboxBitmap(GetType(AProject。 AClass),AClass)_

公共类AClass

继承System.Windows.Forms.TextBox

''属性,方法,和事件剪辑

结束班级

结束命名空间


位图是15x15 16色。 (文档说16x16,专家网站说

16x15或15x16但是如果这是逐个宽度或者

宽度高,那么就不用说了我采用了最低的共同点。)构建操作

设置为嵌入式资源。


该文件列在项目的资源和持久性设置



在编译时链接。


我已经尝试了几个字符串值的排列第二个

参数

头寸包括......


AProject.Resources.AClass(w /和w / o。 bmp")

Resources.AClass(w /和w / o" .bmp")

AProject.AClass(w / and w / o" .bmp" )

AClass(w /和w / o.bmp)


我已经尝试将BMP重新定位到项目的根目录和/或

类目录。


我已经尝试了一个完全限定的路径和文件名。


我我已经尝试了除电击治疗以外的所有事情,而且我很认真。

今天考虑到这个选项。


我做错了什么(除了浪费时间在这个非常小的

琐事上?



< blockquote>

" Mudhead" < no ***** @ yourhouse.com写信息

news:u0 ************** @ TK2MSFTNGP05.phx.gbl ...


< ToolboxBitmap(GetType(AProject.AClass)," AProject.AClass.bmp")>



谢谢,Mudhead。 (仍然看到瓶子?)必须与我的

安装有关。它只是不是为我做的。

[...这是一系列留下美丽的Rancho Malario的印第安人 - 为你腾出空间

!这里是美丽的Tears高尔夫球场...(点击)... et's

谈论你的车。它在尖叫着请洗我!现在,如果你是一个先生

常识,当我告诉你我有一个信封

时,你不会相信我当你开车回家工作时,你会清理你的车。好吧,George,

这次相信我,因为这个不喜欢奥地利

自我锐化的剃须刀。不,朋友,不要像热带地区那样过热。
鱼。没有像堤防一样的嗖嗖和滴水......(点击)......嗨!我是乔

甜菜。比如说,已故退役的退伍老兵有多少机会获得高薪,更多的糖,以及你梦寐以求的免费骡子?

嗯, 想想吧。然后脱掉鞋子。现在你可以看到增加了多少

花钱机会对每个人来说都意味着更难的工作,而且更多的工作也是如此!

今天你也应该这样做,Joe。加入数以百万计的邻居,交上你的鞋子吧b $ b!对于INDUSTRY!]


这是一个时髦的解决方案。我遇到了同样的问题,但我终于得到了

来在我的机器上工作。这就是我如何做到的。


包括一个16x16位图,并将Build Action设置为Embedded Resource。


将此添加到您的班级和编译。

< ToolboxBitmap(GetType(AClass)," AClass.bmp")_


编译完成后,打开你的位图(来自解决方案资源管理器)在MSPaint和

中使其缩小为10x10,然后保存。重新编译项目。


再次打开Bitmap并将其重置为16x16,保存然后重新编译。

现在应该在加载时显示进入IDE。


您可能需要做几次这样做才能让它变大,然后再减少
,但最终它会起作用。您也可以尝试反转

图片(这似乎有帮助)。我之前带了大约3到4次

开始服用。我现在可以将任何位图(作为嵌入式资源)添加到我的

项目中,它完美无缺。


我不知道为什么会这样,它只是确实。

" MyndPhlyp" < no **** @ homeright.nowwrote in message

news:%2 *************** @ TK2MSFTNGP04.phx.gbl ...


>

" Mudhead" < no ***** @ yourhouse.com写信息

news:u0 ************** @ TK2MSFTNGP05.phx.gbl ...


>< ToolboxBitmap(GetType(AProject.AClass)," AProject.AClass.bmp")>



谢谢,Mudhead。 (仍然看到瓶子?)必须与我的

安装有关。它只是不是为我做的。


[...这是印度人留下美丽的Rancho Malario的一系列 - 来制作

房间

为你!这里是美丽的Tears高尔夫球场...(点击)... et's

谈论你的车。它在尖叫着请洗我!现在,如果你是一个

先生

常识,当我告诉你我有一个

信封

,当你开车回家上班时,你会清理你的车。好吧,George,

这次相信我,因为这个不喜欢奥地利

自我锐化的剃须刀。不,朋友,不要像热带地区那样过热。
鱼。没有像堤防一样的嗖嗖和滴水......(点击)......嗨!我是乔

甜菜。比如说,退役的退役老将有多大的机会来支付这笔好工资,更多的糖,以及你梦寐以求的免费骡子? br />
好​​吧,考虑一下。然后脱掉鞋子。现在你可以看到

如何增加

花钱机会对每个人来说都意味着更难的工作,而且更多的工作也是如此!

今天你的工作也是如此,乔。加入数以百万计的邻居,并将

换成你的鞋子!对于工业!]



(Second posting attempt)

I have been through tons of old postings, several web sites, books, and even
tried consulting a psychic but nothing is yielding the majik answer. I''m
using VB ''05 Express on a Win2K system.

The project has everything grouped under various directories. The Solution
Explorer looks like...

AProject
--My Project
--classes
----AClass.vb
--forms
----AForm.vb
--Resources
----AClass.bmp

If you haven''t guessed it already I am trying to get the AClass.bmp to be
the Toolbox icon for the AClass class rather than the default gear. The
class''s abbreviated version looks like...

Namespace AProject
<ToolboxBitmap(GetType(AProject.AClass), "AClass")_
Public Class AClass
Inherits System.Windows.Forms.TextBox
'' Properties, Methods, and Events snipped
End Class
End Namespace

The bitmap is 15x15 16-color. (Documentation says 16x16, expert sites say
16x15 or 15x16 but don''t bother to mention if that is height-by-width or
width-by-height so I took the lowest common denominator.) The Build Action
is set to Embedded Resource.

The file is listed in the Project''s Resources and the Persistence is set to
Linked at compile time.

I''ve tried several permutations on the string value at the second parameter
position including...

AProject.Resources.AClass (w/ and w/o ".bmp")
Resources.AClass (w/ and w/o ".bmp")
AProject.AClass (w/ and w/o ".bmp")
AClass (w/ and w/o ".bmp")

I''ve tried relocating the BMP to the root directory of the Project and/or
the classes directory.

I''ve tried a fully-qualified path and file name.

I''ve tried everything except electroshock therapy and I''m seriously
considering even that option today.

What the heck am I doing wrong (other than wasting time on this very trivial
matter)?

解决方案

<ToolboxBitmap(GetType(AProject.AClass), "AProject.AClass.bmp")>

"MyndPhlyp" <no****@homeright.nowwrote in message
news:uY**************@TK2MSFTNGP04.phx.gbl...

(Second posting attempt)

I have been through tons of old postings, several web sites, books, and
even
tried consulting a psychic but nothing is yielding the majik answer. I''m
using VB ''05 Express on a Win2K system.

The project has everything grouped under various directories. The Solution
Explorer looks like...

AProject
--My Project
--classes
----AClass.vb
--forms
----AForm.vb
--Resources
----AClass.bmp

If you haven''t guessed it already I am trying to get the AClass.bmp to be
the Toolbox icon for the AClass class rather than the default gear. The
class''s abbreviated version looks like...

Namespace AProject
<ToolboxBitmap(GetType(AProject.AClass), "AClass")_
Public Class AClass
Inherits System.Windows.Forms.TextBox
'' Properties, Methods, and Events snipped
End Class
End Namespace

The bitmap is 15x15 16-color. (Documentation says 16x16, expert sites say
16x15 or 15x16 but don''t bother to mention if that is height-by-width or
width-by-height so I took the lowest common denominator.) The Build Action
is set to Embedded Resource.

The file is listed in the Project''s Resources and the Persistence is set
to
Linked at compile time.

I''ve tried several permutations on the string value at the second
parameter
position including...

AProject.Resources.AClass (w/ and w/o ".bmp")
Resources.AClass (w/ and w/o ".bmp")
AProject.AClass (w/ and w/o ".bmp")
AClass (w/ and w/o ".bmp")

I''ve tried relocating the BMP to the root directory of the Project and/or
the classes directory.

I''ve tried a fully-qualified path and file name.

I''ve tried everything except electroshock therapy and I''m seriously
considering even that option today.

What the heck am I doing wrong (other than wasting time on this very
trivial
matter)?




"Mudhead" <no*****@yourhouse.comwrote in message
news:u0**************@TK2MSFTNGP05.phx.gbl...

<ToolboxBitmap(GetType(AProject.AClass), "AProject.AClass.bmp")>

Thanks, Mudhead. (Still seeing Bottles?) Must be something to do with my
installation. It just isn''t doing it for me.
[...This is a line of Indians leaving beautiful Rancho Malario-to make room
for YOU! Here''s the beautiful Trail of Tears golf course...(click)...et''s
talks about your car. It''s screaming "Wash me, please!" Now, if you''re a Mr.
Common Sense, you won''t believe me when I tell you that I''ve got an envelope
that''ll clean your car while you''re driving it home to work. Well, George,
believe me this time, because this one isn''t like the Austrian
self-sharpening razors. No, friends, no overheating like the tropical
fishes. No zizzing and dripping like with the dike...(click)...Hi! I''m Joe
Beets. Say, what chance does a returning deceased war veteran have for that
good-paying job, more sugar, and the free mule you''ve been dreaming of?
Well, think it over. Then take off your shoes. Now you can see how increased
spending opportunities mean harder work for everyone, and more of it, too!
So do your part today, Joe. Join with millions of your neighbors and turn in
your shoes! For INDUSTRY!]


Here''s a funky solution. I had the same problem you did but I finally got it
to work on my machine. Here''s how I did it.

Include a 16x16 bitmap and set Build Action to Embedded Resource.

Add this to your class and the compile.
<ToolboxBitmap(GetType(AClass), "AClass.bmp")_

Once compiled, open up your Bitmap (from Solution Explorer) in MSPaint and
make it smaller like 10x10 and then save it. Recompile the project.

Open it up the Bitmap again and reset it to 16x16, save and then Recompile.
It should now show up when you load it into the IDE.

You might have to do this a couple of times making it bigger and then
smaller but eventually it will work. You might also try inverting the
picture (that seemed to help). I took me about 3 or 4 times before it
started to take. I can now add any bitmap (as an embedded resource) to my
projects and it works perfectly.

I have no idea why this works, it just does.
"MyndPhlyp" <no****@homeright.nowwrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...

>
"Mudhead" <no*****@yourhouse.comwrote in message
news:u0**************@TK2MSFTNGP05.phx.gbl...

><ToolboxBitmap(GetType(AProject.AClass), "AProject.AClass.bmp")>


Thanks, Mudhead. (Still seeing Bottles?) Must be something to do with my
installation. It just isn''t doing it for me.
[...This is a line of Indians leaving beautiful Rancho Malario-to make
room
for YOU! Here''s the beautiful Trail of Tears golf course...(click)...et''s
talks about your car. It''s screaming "Wash me, please!" Now, if you''re a
Mr.
Common Sense, you won''t believe me when I tell you that I''ve got an
envelope
that''ll clean your car while you''re driving it home to work. Well, George,
believe me this time, because this one isn''t like the Austrian
self-sharpening razors. No, friends, no overheating like the tropical
fishes. No zizzing and dripping like with the dike...(click)...Hi! I''m Joe
Beets. Say, what chance does a returning deceased war veteran have for
that
good-paying job, more sugar, and the free mule you''ve been dreaming of?
Well, think it over. Then take off your shoes. Now you can see how
increased
spending opportunities mean harder work for everyone, and more of it, too!
So do your part today, Joe. Join with millions of your neighbors and turn
in
your shoes! For INDUSTRY!]



这篇关于无法获取&lt; ToolboxBitmap&gt;上班!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆