473,320 Members | 1,845 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.

Where do the Oval buttons come from?

Cleveland?

Hi all,
I am writing an ASP.NET 2.0 application in VB.NET. My boss doesn't like the
fact that I still use either rectangular or the default browser buttons on
my pages. He says it doesn't look like web 2.0.

He is correct (he's the boss).

Are the now-common oval (some in 3D) buttons just images or is there a way
in .NET to create them?
We have purchased some 3rd party controls from ComponentArts but I don't see
anything like that.

Failing that, are there some relatively inexpensive "button graphics"
available for download?

Thanks to all...
Nov 6 '07 #1
4 2147
On Nov 6, 11:30 am, "John Kotuby"
<JohnKot...@discussions.microsoft.comwrote:
Cleveland?

Hi all,
I am writing an ASP.NET 2.0 application in VB.NET. My boss doesn't like the
fact that I still use either rectangular or the default browser buttons on
my pages. He says it doesn't look like web 2.0.

He is correct (he's the boss).

Are the now-common oval (some in 3D) buttons just images or is there a way
in .NET to create them?
We have purchased some 3rd party controls from ComponentArts but I don't see
anything like that.

Failing that, are there some relatively inexpensive "button graphics"
available for download?
They are images. Tell him development time is longer using images as
buttons, because every time you want a text change for the button, the
image has to be recreated. Tell him he needs to buy you the $1000
Photoshop package so you can maintain this button library.
Hopefully that will cool him off.

In addition, images won't scale if a user has to enlarge the font
because of a disability.

Web 2.0? Your boss is an idiot!

Nov 6 '07 #2

"Larry Bud" <la**********@yahoo.comwrote in message
news:11*********************@k79g2000hse.googlegro ups.com...
On Nov 6, 11:30 am, "John Kotuby"
<JohnKot...@discussions.microsoft.comwrote:
>Cleveland?

Hi all,
I am writing an ASP.NET 2.0 application in VB.NET. My boss doesn't like
the
fact that I still use either rectangular or the default browser buttons
on
my pages. He says it doesn't look like web 2.0.

He is correct (he's the boss).

Are the now-common oval (some in 3D) buttons just images or is there a
way
in .NET to create them?
We have purchased some 3rd party controls from ComponentArts but I don't
see
anything like that.

Failing that, are there some relatively inexpensive "button graphics"
available for download?
there are free buttons all over the web ... start Googling and give the guy
what he wants if he wants to pay you to do this kind of thing
Nov 6 '07 #3

"Larry Bud" <la**********@yahoo.comwrote in message
news:11*********************@k79g2000hse.googlegro ups.com...
On Nov 6, 11:30 am, "John Kotuby"
<JohnKot...@discussions.microsoft.comwrote:
>Cleveland?

Hi all,
I am writing an ASP.NET 2.0 application in VB.NET. My boss doesn't like
the
fact that I still use either rectangular or the default browser buttons
on
my pages. He says it doesn't look like web 2.0.

He is correct (he's the boss).

Are the now-common oval (some in 3D) buttons just images or is there a
way
in .NET to create them?
We have purchased some 3rd party controls from ComponentArts but I don't
see
anything like that.

Failing that, are there some relatively inexpensive "button graphics"
available for download?

They are images. Tell him development time is longer using images as
buttons, because every time you want a text change for the button, the
image has to be recreated. Tell him he needs to buy you the $1000
Photoshop package so you can maintain this button library.
Hopefully that will cool him off.

In addition, images won't scale if a user has to enlarge the font
because of a disability.

Web 2.0? Your boss is an idiot!
Not wanting to start a flame war, I must say your comments are not well
founded. All you need to do is create a web page that creates a button
(lets say from an image on your website). Pass the text you want as a
querystring and then create the image on the fly and stream it to the
response. Very simple and only one button image needed.

Telling people they are idots without knowing how to fix the problem is
neither smart or helpful.

Following is working code which you can modify to your means:

Public Const imText As String = "ImageText"
Public Const imFolder As String = "ImageFolder"

Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim imageFolder As String
Dim imageText As String
Dim bm As Bitmap
Dim ms As MemoryStream

imageFolder = Request.QueryString(imFolder)
imageText = Request.QueryString(imText)

' if no imageFolder is sent then create a button from a template
button
If imageFolder Is Nothing Then
bm = makeImage(imageText)
Else
bm = makeImage(imageFolder, imageText)
End If

ms = New MemoryStream
bm.Save(ms, ImageFormat.Jpeg)
Response.ContentType = "image/jgp"
Response.BinaryWrite(ms.ToArray())
End Sub

Private Function makeImage(ByVal imagetext As String) As Bitmap
Dim bm As Bitmap
Dim g As Graphics
Dim bfont As Font

Dim tsize As SizeF
'Dim imageHeight As Integer
'Dim imageWidth As Integer

bfont = New Font("Trebuchet MS", 14)

bm = New Bitmap(Server.MapPath("~/Images/YourImage.png"))

g = Graphics.FromImage(bm)
tsize = g.MeasureString(imagetext, bfont)

Dim tx As Single
Dim ty As Single

tx = (bm.Width - tsize.Width) / 2
ty = (bm.Height - tsize.Height) / 2

g.DrawString(imagetext, bfont, New SolidBrush(Color.Black), tx, ty)
g.Dispose()

Return bm

End Function

Hope this helps

LS

Nov 6 '07 #4
Thanks Lloyd (and Barrie),
I appreciate the help...
and so will my boss.

"Lloyd Sheen" <a@b.cwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
>
"Larry Bud" <la**********@yahoo.comwrote in message
news:11*********************@k79g2000hse.googlegro ups.com...
>On Nov 6, 11:30 am, "John Kotuby"
<JohnKot...@discussions.microsoft.comwrote:
>>Cleveland?

Hi all,
I am writing an ASP.NET 2.0 application in VB.NET. My boss doesn't like
the
fact that I still use either rectangular or the default browser buttons
on
my pages. He says it doesn't look like web 2.0.

He is correct (he's the boss).

Are the now-common oval (some in 3D) buttons just images or is there a
way
in .NET to create them?
We have purchased some 3rd party controls from ComponentArts but I don't
see
anything like that.

Failing that, are there some relatively inexpensive "button graphics"
available for download?

They are images. Tell him development time is longer using images as
buttons, because every time you want a text change for the button, the
image has to be recreated. Tell him he needs to buy you the $1000
Photoshop package so you can maintain this button library.
Hopefully that will cool him off.

In addition, images won't scale if a user has to enlarge the font
because of a disability.

Web 2.0? Your boss is an idiot!

Not wanting to start a flame war, I must say your comments are not well
founded. All you need to do is create a web page that creates a button
(lets say from an image on your website). Pass the text you want as a
querystring and then create the image on the fly and stream it to the
response. Very simple and only one button image needed.

Telling people they are idots without knowing how to fix the problem is
neither smart or helpful.

Following is working code which you can modify to your means:

Public Const imText As String = "ImageText"
Public Const imFolder As String = "ImageFolder"

Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim imageFolder As String
Dim imageText As String
Dim bm As Bitmap
Dim ms As MemoryStream

imageFolder = Request.QueryString(imFolder)
imageText = Request.QueryString(imText)

' if no imageFolder is sent then create a button from a template
button
If imageFolder Is Nothing Then
bm = makeImage(imageText)
Else
bm = makeImage(imageFolder, imageText)
End If

ms = New MemoryStream
bm.Save(ms, ImageFormat.Jpeg)
Response.ContentType = "image/jgp"
Response.BinaryWrite(ms.ToArray())
End Sub

Private Function makeImage(ByVal imagetext As String) As Bitmap
Dim bm As Bitmap
Dim g As Graphics
Dim bfont As Font

Dim tsize As SizeF
'Dim imageHeight As Integer
'Dim imageWidth As Integer

bfont = New Font("Trebuchet MS", 14)

bm = New Bitmap(Server.MapPath("~/Images/YourImage.png"))

g = Graphics.FromImage(bm)
tsize = g.MeasureString(imagetext, bfont)

Dim tx As Single
Dim ty As Single

tx = (bm.Width - tsize.Width) / 2
ty = (bm.Height - tsize.Height) / 2

g.DrawString(imagetext, bfont, New SolidBrush(Color.Black), tx, ty)
g.Dispose()

Return bm

End Function

Hope this helps

LS

Nov 6 '07 #5

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

Similar topics

5
by: Lyn | last post by:
Hi, I hope someone can help. I have a main form which mostly fills the Access window. In the bottom half of this form I have a tab control to display various types of data related to the main...
0
by: Klaus Jensen | last post by:
Hi! This has been annoying me for a while now, and I can't get it to work It is really driving me nuts! Basicly this simple webapp created to illustrate my problem, renders five buttons, and...
2
by: James P. | last post by:
Help, I need to display radio buttons on a form. The data is from SQL table: each row in each table is displayed as a radio button. I have multiple SQL tables so I understand I need to put...
7
by: Ben Bush | last post by:
I tested the following code and wanted to get the message of "oval2 got hit" if I click the red one. But I always got "oval1 got hit". from Tkinter import * root=Tk()...
21
by: MLH | last post by:
If I choose a command button on a form in design view, open the properties box and click the Picture property and its wiz button, I'm presented with a lengthy list of pictures. Everything from Add...
2
by: Wayne | last post by:
I've been having a click around Access 2007 this afternoon and have discovered some things that range from annoying to alarming. My Access 2003 menu bars, which I, like many others, use...
0
by: vabsjava | last post by:
Hello Everybody..... I want to use command button which is oval in shape..... how to convert the button shaped in rectangle to oval.... please me in this regard... Thank You
1
by: nish88 | last post by:
Hi!! Actually,i am doing a simulation and i want a dot (small oval) to pop up when i click(by mouse) on the canvas. can anyone please help me or if possible give me the piece of codes to perform...
3
by: potupaul | last post by:
hii... plz help me out ,how to create rounded or oval buttons using c# in VS 2005.
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
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...
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: 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...
0
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...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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.