|
-
Feb 13th, 2008, 10:37 AM
#1
Thread Starter
New Member
How do I add a custom control?
Hi there,
I'm still quite new to the NET and Visual Basic (2005), and I'm trying to create a custom (user-) control, which is nothing more than a couple of buttons on a container.
I have followed a couple of examples (from "Beginning Visual Basic 2005" and others) letter by letter but somehow I just don't get the results as described/expected from the examples.
If I'm to believe the example(s), it should be as 'easy' as selecting a Visual Basic >"Windows Control Library" project, adding the actual controls to the container, building the solution and then when adding a new project the control should be accessible from the Toolbox...however, I cannot add the custom control to a form (in the new project) because it is disabled.
Actually I can see it's not right, because the controls is not only disabled in the toolbox but instead of seeing the (reference-) name like the other controls (Textbox, checkBox, ComboBox) all I get is the (disabled-) text of the path to the actual vb file, as follows :
"Text : C:\Dev\MyTestProject\MyTestControl.vb"
Looking around on the internet I found a sample project to illustrate the creation of custom/user Controls but when opening it I got the same effect on the toolbox (disabled reference to the actual vb file), and more strangely, I was presented with the custom controls present on a form, but NO CLUE of how that was achieved, and I was/am unable to get more instances of those controls on the form myself.
Any idea anyone?
I know I'm probably missing an essential step in the process, maybe even so simple that the books/samples forget to bring it up.
Thanks a lot in advance for any help provided.
Vic
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|