|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to add control/component to the IDE toolbarI've been trying to create a VB.NET window control and add it to the
toolbar where a vb.net form application can click, drag and drop into his form. Been reading all the MSDN docs and can't seem to find how this is done. I'm sure its very simple and I'm over thinking something. In VB6 it was easy because I could right click the toolbar and add the control. The right click property window under VS2005 toolbar has a "Show Items..." but no "add control" idea. It has an Add Tab but no add control. Can someone steer me right here? It will be greatly appreciated. Thanks -- On 2009-05-14, Mike <unkn***@unknown.tv> wrote:
Show quoteHide quote > I've been trying to create a VB.NET window control and add it to the When you right click, do you see a "Choose Items" option?> toolbar where a vb.net form application can click, drag and drop into > his form. > > Been reading all the MSDN docs and can't seem to find how this is > done. I'm sure its very simple and I'm over thinking something. > > In VB6 it was easy because I could right click the toolbar and add > the control. The right click property window under VS2005 toolbar > has a "Show Items..." but no "add control" idea. It has an Add Tab but > no add control. > > Can someone steer me right here? It will be greatly appreciated. > > Thanks > > -- -- Tom Shelton Tom Shelton wrote:
Show quoteHide quote > On 2009-05-14, Mike <unkn***@unknown.tv> wrote: Yes, but I don't see the my .NET dll. I guess it has to be registered >> I've been trying to create a VB.NET window control and add it to the >> toolbar where a vb.net form application can click, drag and drop into >> his form. >> >> Been reading all the MSDN docs and can't seem to find how this is >> done. I'm sure its very simple and I'm over thinking something. >> >> In VB6 it was easy because I could right click the toolbar and add >> the control. The right click property window under VS2005 toolbar >> has a "Show Items..." but no "add control" idea. It has an Add Tab but >> no add control. >> >> Can someone steer me right here? It will be greatly appreciated. >> >> Thanks >> >> -- > > When you right click, do you see a "Choose Items" option? or something? -- Tom Shelton wrote:
> On 2009-05-14, Mike <unkn***@unknown.tv> wrote: Phew! I finally got it. Can you tell me if there is a more straight >> Can someone steer me right here? It will be greatly appreciated. >> >> Thanks >> >> -- > > When you right click, do you see a "Choose Items" option? forward IDE procedure or this the following is basically correct? -------------------- How to create a NON-UI Toolbox Component that will appear in the Component Tray (not on a Windows form) when dropped on a form. Step 1) Create a New Project selecting the Class Library template. Step 2) For the new project, click PROJECT | ADD COMPONENT Step 3) Compile and create the DLL Adding the component to the Toolbox You can add the component to the Toolbox General Tab or create a new tab in the Toolbox. In this example, the General tab is used. Step 4) Select the general tab in the Toolbox, right click and select "Choose Items..." Step 5) Click Browse and find the location of your DLL, click OK. The component *SHOULD* appear in the toolbox General tab. o Testing Step 6) Create a new Windows Application project. Step 7) Display the form and drop the component. The component *SHOULD* appear in the COMPONENT TRAY at the bottom of the form display. -------------------- Overall, what I found, unless I did something wrong, selecting a Windows Control Library Project did not work. This creates a UI user control. I had to create a class library then add a component to it. Simple of course, but if you never done it before, it isn't obvious. In short, IMO, there should be a new project template called: Windows Component Library with a description A project for creating NON-UI ToolBox components to use in Windows applications Is there some IDE method that does this? I believe I saw convert options somewhere, don't recall where, maybe in the class explorer, that saids Convert Class to Component ... Convert Class to Control ... That is what give me the idea of doing the steps above because I didn't recall where these options were at. Anyway, maybe this will help the next .NET newbie because every example I found on MSDN and else where was for creating UI components. :-) Thanks for all your input. -- OK, but does it appear it in the toolbox with it's own icon?
Show quoteHide quote "Mike" <unkn***@unknown.tv> wrote in message news:ekUkWVG1JHA.1900@TK2MSFTNGP04.phx.gbl... > Tom Shelton wrote: >> On 2009-05-14, Mike <unkn***@unknown.tv> wrote: > >>> Can someone steer me right here? It will be greatly appreciated. >>> >>> Thanks >>> >>> -- >> >> When you right click, do you see a "Choose Items" option? > > Phew! I finally got it. Can you tell me if there is a more straight > forward IDE procedure or this the following is basically correct? > > -------------------- > How to create a NON-UI Toolbox Component that will > appear in the Component Tray (not on a Windows form) > when dropped on a form. > > Step 1) Create a New Project selecting the Class Library template. > > Step 2) For the new project, click PROJECT | ADD COMPONENT > > Step 3) Compile and create the DLL > > Adding the component to the Toolbox > > You can add the component to the Toolbox General Tab or create a new tab > in the Toolbox. In this example, the General tab is used. > > Step 4) Select the general tab in the Toolbox, right click and select > "Choose Items..." > > Step 5) Click Browse and find the location of your DLL, click OK. > > The component *SHOULD* appear in the toolbox General tab. > > o Testing > > Step 6) Create a new Windows Application project. > > Step 7) Display the form and drop the component. > > The component *SHOULD* appear in the COMPONENT TRAY at the bottom of the > form display. > -------------------- > > Overall, what I found, unless I did something wrong, selecting a Windows > Control Library Project did not work. This creates a UI user control. I > had to create a class library then add a component to it. Simple of > course, but if you never done it before, it isn't obvious. > > In short, IMO, there should be a new project template called: > > Windows Component Library > > with a description > > A project for creating NON-UI ToolBox components to use in Windows > applications > > Is there some IDE method that does this? > > I believe I saw convert options somewhere, don't recall where, maybe in > the class explorer, that saids > > Convert Class to Component ... > Convert Class to Control ... > > That is what give me the idea of doing the steps above because I didn't > recall where these options were at. > > Anyway, maybe this will help the next .NET newbie because every example I > found on MSDN and else where was for creating UI components. :-) > > Thanks for all your input. > > -- It adds what looks to be a generic stub icon - a cyan colored gear
(circle with teeth) icon. I presumed I would be able to add one to the component resources. I don't see a property for it, only three: + Design (NAME) : WildcatComponent Language : (Default) Localizable: FALSE Thanks James Hahn wrote: Show quoteHide quote > OK, but does it appear it in the toolbox with it's own icon? > >> >> Phew! I finally got it. Can you tell me if there is a more straight >> forward IDE procedure or this the following is basically correct? >> >> -------------------- >> How to create a NON-UI Toolbox Component that will >> appear in the Component Tray (not on a Windows form) >> when dropped on a form. >> >> Step 1) Create a New Project selecting the Class Library template. >> >> Step 2) For the new project, click PROJECT | ADD COMPONENT >> >> Step 3) Compile and create the DLL >> >> Adding the component to the Toolbox >> >> You can add the component to the Toolbox General Tab or create a new >> tab in the Toolbox. In this example, the General tab is used. >> >> Step 4) Select the general tab in the Toolbox, right click and select >> "Choose Items..." >> >> Step 5) Click Browse and find the location of your DLL, click OK. >> >> The component *SHOULD* appear in the toolbox General tab. >> >> o Testing >> >> Step 6) Create a new Windows Application project. >> >> Step 7) Display the form and drop the component. >> >> The component *SHOULD* appear in the COMPONENT TRAY at the bottom of >> the form display. >> -------------------- >> >> Overall, what I found, unless I did something wrong, selecting a >> Windows Control Library Project did not work. This creates a UI user >> control. I had to create a class library then add a component to it. >> Simple of course, but if you never done it before, it isn't obvious. >> >> In short, IMO, there should be a new project template called: >> >> Windows Component Library >> >> with a description >> >> A project for creating NON-UI ToolBox components to use in Windows >> applications >> >> Is there some IDE method that does this? >> >> I believe I saw convert options somewhere, don't recall where, maybe >> in the class explorer, that saids >> >> Convert Class to Component ... >> Convert Class to Control ... >> >> That is what give me the idea of doing the steps above because I >> didn't recall where these options were at. >> >> Anyway, maybe this will help the next .NET newbie because every >> example I found on MSDN and else where was for creating UI components. >> :-) >> >> Thanks for all your input. >> >> -- > Piece of cake!
<ToolboxBitmapAttribute(GetType(WildcatComponent), "cateyes.ico")> _ Public Class WildcatComponent End Class Using this method, change the icon file properties Build Action to Embedded Resource. ..NET ROCKS! -- Show quoteHide quoteMike wrote: > It adds what looks to be a generic stub icon - a cyan colored gear > (circle with teeth) icon. I presumed I would be able to add one to the > component resources. I don't see a property for it, only three: > > + Design > (NAME) : WildcatComponent > Language : (Default) > Localizable: FALSE > > Thanks > > James Hahn wrote: >> OK, but does it appear it in the toolbox with it's own icon? >> >>> >>> Phew! I finally got it. Can you tell me if there is a more straight >>> forward IDE procedure or this the following is basically correct? >>> >>> -------------------- >>> How to create a NON-UI Toolbox Component that will >>> appear in the Component Tray (not on a Windows form) >>> when dropped on a form. >>> >>> Step 1) Create a New Project selecting the Class Library template. >>> >>> Step 2) For the new project, click PROJECT | ADD COMPONENT >>> >>> Step 3) Compile and create the DLL >>> >>> Adding the component to the Toolbox >>> >>> You can add the component to the Toolbox General Tab or create a new >>> tab in the Toolbox. In this example, the General tab is used. >>> >>> Step 4) Select the general tab in the Toolbox, right click and select >>> "Choose Items..." >>> >>> Step 5) Click Browse and find the location of your DLL, click OK. >>> >>> The component *SHOULD* appear in the toolbox General tab. >>> >>> o Testing >>> >>> Step 6) Create a new Windows Application project. >>> >>> Step 7) Display the form and drop the component. >>> >>> The component *SHOULD* appear in the COMPONENT TRAY at the bottom of >>> the form display. >>> -------------------- >>> >>> Overall, what I found, unless I did something wrong, selecting a >>> Windows Control Library Project did not work. This creates a UI user >>> control. I had to create a class library then add a component to it. >>> Simple of course, but if you never done it before, it isn't obvious. >>> >>> In short, IMO, there should be a new project template called: >>> >>> Windows Component Library >>> >>> with a description >>> >>> A project for creating NON-UI ToolBox components to use in Windows >>> applications >>> >>> Is there some IDE method that does this? >>> >>> I believe I saw convert options somewhere, don't recall where, maybe >>> in the class explorer, that saids >>> >>> Convert Class to Component ... >>> Convert Class to Control ... >>> >>> That is what give me the idea of doing the steps above because I >>> didn't recall where these options were at. >>> >>> Anyway, maybe this will help the next .NET newbie because every >>> example I found on MSDN and else where was for creating UI >>> components. :-) >>> >>> Thanks for all your input. >>> >>> -- >> On May 13, 8:53 pm, Mike <unkn***@unknown.tv> wrote:
Show quoteHide quote > I've been trying to create a VB.NET window control and add it to the I assume the custom control has been compiled into a DLL. You may want> toolbar where a vb.net form application can click, drag and drop into > his form. > > Been reading all the MSDN docs and can't seem to find how this is > done. I'm sure its very simple and I'm over thinking something. > > In VB6 it was easy because I could right click the toolbar and add > the control. The right click property window under VS2005 toolbar > has a "Show Items..." but no "add control" idea. It has an Add Tab but > no add control. > > Can someone steer me right here? It will be greatly appreciated. > to create a tab just to store custom controls or not. Drag and drop the DLL file into the tab of your choice in the toolbox. Simple, eh? joecool1***@live.com wrote:
> On May 13, 8:53 pm, Mike <unkn***@unknown.tv> wrote: I hope it was :-)>> I've been trying to create a VB.NET window control and add it to the >> toolbar where a vb.net form application can click, drag and drop into >> his form. >> >> Can someone steer me right here? It will be greatly appreciated. >> > > I assume the custom control has been compiled into a DLL. You may want > to create a tab just to store custom controls or not. Drag and drop > the DLL file into the tab of your choice in the toolbox. > > Simple, eh? Right. It had a General tab, so I added a Wildcat tab. From solution explorer, I tried dragging the project name, but only took the CustomControl1.vb file shows up as: - Wildcat Pointer TEXT: full path name to file. You mean, compile the DLL, Show all files, and drag and drop the bin\*.dll into the custom tab? Let me try that.... Same thing, just shows: TEXT: Full path to dll file When I bring up another test Windows Form application, I don't see see this the Tab. I also tried adding a reference to the DLL.
Application development pointers
problem with RaiseEvents detect file status Internal Server Error 500 Resizing the click area of a checkbox. Saving Search for values in between two values in a string? Vb and Active Directory Visual Basic 4.0 16/32 Capture Routines for .Net? Export a Graphic to Excel Spreadsheets |
|||||||||||||||||||||||