M
M O J O
Hi,
I need a lillte guidance on how to create a simple component and put in
in the toolbox.
Here's how I've done so far, please let me know if there's a better
aproach (I have some question to this aproach later in this post)....
1) I open Vs.net.
2) I create a new "Windows Control Library" called "MyTestLib".
3) I add a new "Component Class" called MyPanel.
4) I fill in the code in MyPanel (derived from Panel).
5) I build the project.
6) I open a new WindwosForms solution.
7) In the toolbox I right-click to add/remove items.
8) In the ".Net Framework Components", I browse to the MyTestLib bin
directory.
9) I select MyTestLib.dll and click open.
10) I check that the MyPanel's checkbox is checked and click ok.
Now my conponent (MyPanel) shows up in the toolbox.
Here's my questions....
1) Is the aproach above the right aproach?
2) If I chose to add a bitmap (embedded resource) for MyPanel (that
means MyPanel.bmp) and rebuilds MyTestLib, how do I get the bitmaps to
show up in the toolbox? Do I really have to remove my old components
from the toolbox and then add them again? Isn't there some kinda refresh?
3) If I add a new component MyTextBox to my library (MyTestLib) and
rebuilds MyTestLib, how do I get the new component to show up on the
toolbox? Do I really have to remove my old components from the toolbox
and then add them again? Isn't there an easier way to add the newly
created component?
Thanks in advance!
M O J O
I need a lillte guidance on how to create a simple component and put in
in the toolbox.
Here's how I've done so far, please let me know if there's a better
aproach (I have some question to this aproach later in this post)....
1) I open Vs.net.
2) I create a new "Windows Control Library" called "MyTestLib".
3) I add a new "Component Class" called MyPanel.
4) I fill in the code in MyPanel (derived from Panel).
5) I build the project.
6) I open a new WindwosForms solution.
7) In the toolbox I right-click to add/remove items.
8) In the ".Net Framework Components", I browse to the MyTestLib bin
directory.
9) I select MyTestLib.dll and click open.
10) I check that the MyPanel's checkbox is checked and click ok.
Now my conponent (MyPanel) shows up in the toolbox.
Here's my questions....
1) Is the aproach above the right aproach?
2) If I chose to add a bitmap (embedded resource) for MyPanel (that
means MyPanel.bmp) and rebuilds MyTestLib, how do I get the bitmaps to
show up in the toolbox? Do I really have to remove my old components
from the toolbox and then add them again? Isn't there some kinda refresh?
3) If I add a new component MyTextBox to my library (MyTestLib) and
rebuilds MyTestLib, how do I get the new component to show up on the
toolbox? Do I really have to remove my old components from the toolbox
and then add them again? Isn't there an easier way to add the newly
created component?
Thanks in advance!
M O J O