[RESOLVED]Help me on Creating Custom Control
Hello, I am new in VB.Net, and I need help on creating custom buttons. How do I make a custom button from the control class ? What steps do I need ? Based on what I have read from MSDN, these steps are required, are they correct, or have I forgot something ?
1. Create a class for the button
2. Declare the properties
3. Create and Overrides methods
4. Declare Events
But still, I am confuse....MSDN doesn't give much infos about creating custom buttons.
Note:
So, I need a button without a border, and when it's clicked, it will be inseted. And it will stay inseted until the user click another button.
Right now, everything are still in grey for me, so, please help. Thanks a lot ! Appreciate your time !
Chris
Re: Help me on Creating Custom Control
Welcome to the forum.
I suggest you download the 101 VB samples from the Microsoft site and have a look at the control creation samples.
On another note, if you're new to VB.NET I would suggest you master the language and its existing controls first and then attempt to create your own controls. No that its complicated or difficult but most of the articles and help assume you have some experience with the language. I personallym created my first usercontrol just a couple of days ago, that after having worked with VB.NET since 2002.
Re: Help me on Creating Custom Control
If this is an isolated situation I'd suggest you just use a Label rather than authoring your own control. It will be much easier. All you have to do is set the Label's BorderStyle to 3D and it will look like a recessed button. You then set the BorderStyle back to None to make it "pop back" again. You won't have the XP look and feel, but that would be difficult to achieve with a custon control anyway. If you want it to look fancy you could just use a PictureBox and change the image when needed.
Re: Help me on Creating Custom Control
Thanks to both of you ! I'll try jmcilhinney's idea about using the label ! Well, I haven't got that on my mind, but it's worth to try !
And for Mr.NO:
<Quote>
I personallym created my first usercontrol just a couple of days ago, that after having worked with VB.NET since 2002.</quote>
Oh my God ! Does it took daaat' long ??????? Thanks for the the warmth welcome and clues you gave !
Re: [RESOLVED]Help me on Creating Custom Control
Kampfcoder
It doesn't take that long to start creating usercontrols but I just didn't get around starting one until I badly needed one :D