Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Button - No border

11 views
Skip to first unread message

Keith

unread,
Jul 8, 2004, 1:27:07 AM7/8/04
to
I would like to create my own custom button control. I
want the button to be able to change color - and/or - make
the border transparent.

I know the OpenNETCF ButtonEx has these properties, but I
was hoping to create my own control. Could someone steer
me in the right direction with some advice. Perhaps you
could refer me to some web links or MSDN articles that
refer to custom controls.
I'm hoping this is somthing relatively easy - but maybe
I'm wrong.

thank you.

Krzysztof Kazmierczak

unread,
Jul 8, 2004, 2:09:01 AM7/8/04
to
Hi!

Yes, I think that's easy ;) Some useful links:

http://www.codeproject.com/cs/miscctrl/PocketPCColourBtn.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnroad/html/road11272002.asp

http://samples.gotdotnet.com/quickstart/CompactFramework/doc/picturebutton.aspx


If you will have any problems, mail me. I'll send you my custom button control (very simple) code.

HTH
Kind regards!
Krzysztof Kaźmierczak

Tim Wilson UNDERSCORE AT PERIOD

unread,
Jul 8, 2004, 2:10:14 AM7/8/04
to
You can always walk through the source for the OpenNETCF ButtonEx control,
it's freely available. It's not overly complicated as far as custom controls
go either.
http://www.opennetcf.org/SourceBrowse/view.aspx?f=d:/sites/OpenNETCF/InetPub/wwwroot/Source/OpenNETCF.Windows.Forms/Button.cs

Alternatively, you can get the source as part of the SDF download.
http://www.opennetcf.org/sdf/

Here are a few more links that cover various aspects of custom control
development.
http://www.codeproject.com/cs/miscctrl/PocketPCColourBtn.asp
http://samples.gotdotnet.com/quickstart/CompactFramework/doc/picturebutton.aspx
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnroad/html/road11272002.asp
http://www.intelliprog.com/articles/index.html
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetcomp/html/customctrlscompactfx.asp

--
Tim Wilson
.Net Compact Framework MVP

"Keith" <anon...@discussions.microsoft.com> wrote in message
news:28aae01c464ac$35e9e510$a501...@phx.gbl...

Neil Cowburn [MVP]

unread,
Jul 8, 2004, 5:35:23 AM7/8/04
to
Keith,

The way in which ButtonEx controls the border is by creating a control
derived from System.Windows.Forms.Control and overriding the OnPaint event
so that we have the ultimate say in how the control is drawn and displayed
to the user.

Creating your own button isn't a hard task. Check out some of the links
given by the other responders for more info.

--Neil

"Keith" <anon...@discussions.microsoft.com> wrote in message
news:28aae01c464ac$35e9e510$a501...@phx.gbl...

Keith

unread,
Jul 10, 2004, 1:36:57 AM7/10/04
to
Krzysztof - I'm still stuck. I wanted to see if I could
see the code you created. What is your email address - I
tried the one posted - and it bounced.

thanks.

>Krzysztof Kaźmierczak
>.
>

0 new messages