473,320 Members | 1,953 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

customise button appearences

im using radio button array with button appearence.

Im just wondering if there is a easy way programtically to enhance the
button look with such things a gradient color fills and effects and
stuff, without having to resort to using bitmaps or images for
backgrounds ? Im mostly interested in adding something like a metalic
gradient effect to the buttons and the form background.
Im trying to avoid the use if bitmaps and images becasue i find
frequetly in development the size of my buttons and forms can change
and its a pain to have to resize source images all the time.

Incidently is it possible to perhaps use a vector based image format
that can be resized without pixelisation as a button or form
backgorund.

and can images and bitmaps be embedded into the application when used
for buttons and forms or must they be located in the local app
directory ?

thanks for any advice

Peted
Jun 6 '07 #1
1 1374
On Tue, 05 Jun 2007 19:17:57 -0700, <Petedwrote:
im using radio button array with button appearence.

Im just wondering if there is a easy way programtically to enhance the
button look with such things a gradient color fills and effects and
stuff, without having to resort to using bitmaps or images for
backgrounds ? Im mostly interested in adding something like a metalic
gradient effect to the buttons and the form background.

[...]
Incidently is it possible to perhaps use a vector based image format
that can be resized without pixelisation as a button or form
backgorund.
I wish I knew the exact answer to your queston. :)

However, some thoughts on the general idea...

As far as doing something vector-based, it seems to me that you could
instead of using a Bitmap, use a Metafile which is essentially a
vector-based thing. Or for that matter, I suppose you could override the
OnPaint() method and just always draw what you want. As far as drawing
the kinds of things you're talking about goes, I have not played with it
yet, but I seem to recall a variety of "fancy" drawing commands from GDI+,
which I think is supported from .NET.

Also, I haven't had a chance to try to learn about the whole
"VisualStyles" stuff, but it sure seems to me that this is exactly what
they exist for. To provide alternate visual styles for your controls. I
could be wrong, but perhaps if you look into that section of the .NET
Framework classes, there will be some guidance as to how to customize the
visual style of your control.
and can images and bitmaps be embedded into the application when used
for buttons and forms or must they be located in the local app
directory ?
Well, you can include a bitmap as a resource in the application, which you
can then use to create a Bitmap instance using the Bitmap.FromResource()
method. It would be a little harder to create a Metafile instance from a
resource, but I believe you could do it by storing the metafile saved as a
file in the resources as a plain binary resource, then use that to create
a MemoryStream, then use that with Metafile.FromStream() to create the
metafile instance. If there's some other "image" you're thinking of that
you want to store in the application, you should probably elaborate on
that. Other than bitmaps and metafiles, the only other thing that comes
to mind is icons, and I don't think they are all that applicable here.

Pete
Jun 6 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Skip Hollowell | last post by:
I am working on a menu bar for a site, and am using buttons in the bar (because the customer wants to use accessKeys for each selection, apparently it is too much work to click on them with a...
25
by: KK | last post by:
Hi, I am using history.go(-1) for implementing the back button functionality. Its working fine but with this exception. 1. The page which is having back button has some hyperlinks on it. ...
1
by: Kay | last post by:
Hi all, I'm trying to create an app to allow user to roster staff. My plan is to have a list of people in a listview on the left then a "calender look" control on the right, which will display...
1
by: zhuang | last post by:
With Javascript, i know I could create confirm dialog in ASP.NET app.But the button is yes and cancel, is there anyway to change it to yes and no Thanks zhuang
5
by: Tsair | last post by:
I do a customise DataGridColumn with a UserControl (TextBox + Button for Calender), DataGridView does not show the data content of the column.
3
by: Yash | last post by:
Hi all, I found that while we are updating our application, the application is not known to tomcat, untill it is completed. So tomcat sends 503 page as resource not found. I want to know is...
4
by: Kev | last post by:
Hello Everyone, I am attempting to customise subform datasheet columns for different users by making them visible or not depending on which ward they are in. I am using the tag property on the...
2
by: singh79 | last post by:
Pls Give me Any One Ans.. How To Customise Web Page(Fix The Size of Page Using C#) Regards atul singh
2
by: singh79 | last post by:
Pls Any One Give Me Ans I want to Make Customise calender Control in Asp.net2.0 with the Help of C#. and I want to increse ind Decrease Year By Particular Tab. Regards & Thanks Atul...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.