Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Button and Images
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00946621
Message ID:
00946646
Views:
21
Shawn,

>How do i add an image to a base class button and have the image show up when i drop it on a form in the designer.
>
>Since i can't set the properties through the properties window how do i do this in code.

By default, if a button's FlatStyle property is set to FlatStyle.System (which it is in MM .NET so it picks up Windows XP styles at run time), unfortunately, this prevents the buttom from displaying an image (a Windows Forms "issue"). If you want to display an image on a button you can change the button's FlatStyle property to FlatStyle.Standard.

Also, you CAN set this property in a button subclass. Just double-click the button class in the Solution Explorer, and go to the Properties Window to set the Image property.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform