I am attempting to create icons for controls I have created using VB.NET by
using the System.Drawing. ToolboxBitmap attribute. I have managed to do this
in C# by specifying the path to the *.ico file, but I have been unable to
get any of the overloads to work in VB.NET. I would like to store the *.ico
files in a *.resx file so that users do not need anything other than the
*.dll, but at the moment I am just trying to get any of the overloads of
System.Drawing. ToolboxBitmap to work in VB.NET. Here is my code and
directories (obviously not all files are listed, but I think these are the
ones of significance):
NateCtrl2005 (this is the name of my project)
My Project
Resources.resx (this is the resources file with my *.ico files)
ToolboxIcons (folder where I am storing the *.ico files)
ConditionalRequ iredTextValidat or.ico (Build Action=Embedded
Resource)
ConditionalRequ iredTextValidat or.vb
Code in ConditionalRequ iredTextValidat or.vb:
Namespace NathanSokalski
<System.Drawing .ToolboxBitmap( "C:\Inetpub\www root\NateCtrl20 05\ToolboxIcons \ConditionalReq uiredTextValida tor.ico")>
Public Class ConditionalRequ iredTextValidat or
using the System.Drawing. ToolboxBitmap attribute. I have managed to do this
in C# by specifying the path to the *.ico file, but I have been unable to
get any of the overloads to work in VB.NET. I would like to store the *.ico
files in a *.resx file so that users do not need anything other than the
*.dll, but at the moment I am just trying to get any of the overloads of
System.Drawing. ToolboxBitmap to work in VB.NET. Here is my code and
directories (obviously not all files are listed, but I think these are the
ones of significance):
NateCtrl2005 (this is the name of my project)
My Project
Resources.resx (this is the resources file with my *.ico files)
ToolboxIcons (folder where I am storing the *.ico files)
ConditionalRequ iredTextValidat or.ico (Build Action=Embedded
Resource)
ConditionalRequ iredTextValidat or.vb
Code in ConditionalRequ iredTextValidat or.vb:
Namespace NathanSokalski
<System.Drawing .ToolboxBitmap( "C:\Inetpub\www root\NateCtrl20 05\ToolboxIcons \ConditionalReq uiredTextValida tor.ico")>
Public Class ConditionalRequ iredTextValidat or
Comment