473,395 Members | 2,010 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,395 software developers and data experts.

need component for asp page that genereates custom lettering in a jpg

similar to: http://overtons.com/lettering/lettering.html

I was thinking of writing it myself in either vb6 as an activex dll server
component, or vb.net - it does seem more feasable to me in vb .net, but it
would also be great if this was already done.

Any information appreciated.

Scott Emick
se****@ham.phoenix-sys.com

to send me an email, remove the 'ham' if its not spam.
Nov 20 '05 #1
6 876
Cor
Hi Scott,

A short time ago I did make this, I still want to make that clock a little
bit nicer but that is not much work I think.
(Form is a webform)

\\\Form 1 Needs a imagebox on the page
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Me.Image1.Height = New Unit(32)
Me.Image1.Width = New Unit(200)
Image1.Visible = True
Dim scriptString As String = "<script language=JavaScript>" & _
"setclock(); function setclock(){document.images.Image1.src = " & _

"'http://localhost/WebClock/WebForm2.aspx';setTimeout('setclock()',1000)}</s
cript>"
Page.RegisterStartupScript("setclock", scriptString)
End Sub
///
\\\Form2 needs nothing
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim myForeBrush As Brush = Brushes.Black
Dim myFont As New Font("Times New Roman", 8, FontStyle.Regular)
Dim textHeight As Single
Dim bm As New Bitmap(120, 20)
Dim g As Graphics = Graphics.FromImage(bm)
g.Clear(Color.White)
Dim textSize As SizeF = g.MeasureString("now.tostring", myFont)
g.DrawString(Now.ToString, myFont, myForeBrush, _
New RectangleF(0, 0, 120, 20))
Dim ms As New IO.MemoryStream
Dim arrImage() As Byte
bm.Save(ms, Imaging.ImageFormat.Bmp)
arrImage = ms.GetBuffer
Response.BinaryWrite(arrImage)
End Sub
///
Nov 20 '05 #2
* "Scott Emick" <se****@ham.phoenix-sys.com> scripsit:
similar to: http://overtons.com/lettering/lettering.html


Are you sure this URL works?

--
Herfried K. Wagner [MVP]
<http://dotnet.mvps.org/>
Nov 20 '05 #3
Cor
> Are you sure this URL works?

For me it does Herfried, something in Austria maybe,

I forgot the Hungarians yesterday, I asume they speak mostly also German?

Cor
Nov 20 '05 #4
* "Cor" <no*@non.com> scripsit:
Are you sure this URL works?
For me it does Herfried, something in Austria maybe,


I tried several times and it didn't work. In the meantime, the URL
works. Thank you for testing.
I forgot the Hungarians yesterday, I asume they speak mostly also German?


Many Hungarians are able to speak German.

--
Herfried K. Wagner [MVP]
<http://dotnet.mvps.org/>
Nov 20 '05 #5
Thanks I will try it out.

You can also go to the homepage http://www.overtons.com/
and select BOAT LETTERING from the left-side menu.

It allows you to select font type/colors, and drop shadow, which may be the
most difficult for me to replicate. It then displays what your custom boat
lettering would look like.

Scott

"Cor" <no*@non.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi Scott,

A short time ago I did make this, I still want to make that clock a little
bit nicer but that is not much work I think.
(Form is a webform)

\\\Form 1 Needs a imagebox on the page
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Me.Image1.Height = New Unit(32)
Me.Image1.Width = New Unit(200)
Image1.Visible = True
Dim scriptString As String = "<script language=JavaScript>" & _
"setclock(); function setclock(){document.images.Image1.src = " & _
"'http://localhost/WebClock/WebForm2.aspx';setTimeout('setclock()',1000)}</s cript>"
Page.RegisterStartupScript("setclock", scriptString)
End Sub
///
\\\Form2 needs nothing
Private Sub Page_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim myForeBrush As Brush = Brushes.Black
Dim myFont As New Font("Times New Roman", 8, FontStyle.Regular)
Dim textHeight As Single
Dim bm As New Bitmap(120, 20)
Dim g As Graphics = Graphics.FromImage(bm)
g.Clear(Color.White)
Dim textSize As SizeF = g.MeasureString("now.tostring", myFont)
g.DrawString(Now.ToString, myFont, myForeBrush, _
New RectangleF(0, 0, 120, 20))
Dim ms As New IO.MemoryStream
Dim arrImage() As Byte
bm.Save(ms, Imaging.ImageFormat.Bmp)
arrImage = ms.GetBuffer
Response.BinaryWrite(arrImage)
End Sub
///

Nov 20 '05 #6
Cor,

Thanks once again - I was able to adapt the code to my own needs
AND get the dropshadowing to work as well!

Now I need to decide if I want to keep it as an aspx page (the 2nd
page), or try to put it into a component for the developers here to
use. The site they are working on is only asp, not dotnet - I could
still have an asp page call the aspx to generate the image, or try to
make a component and use the utility that comes with .net to convert a
dll so it can be used with vb6/asp.

Scott Emick
Nov 20 '05 #7

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

Similar topics

12
by: J. David Kent | last post by:
I have a web page with a form about halfway down the page. Instead of starting at the top of the page when it is loaded I would like it to go directly to the top of the form. Can this be done? ...
5
by: MFC | last post by:
Ok, after three C# books, (C# How to Program, Programming in the Key of C#, and C# Weekend Crash Course) and three weeks, I believe I have tried everything to make a certain form function...
4
by: Keith Smith | last post by:
I am reading this article... http://www.codeproject.com/cs/combobox/csautocomplete.asp About half-way down you will see a section titled "Using This Control" (written in orange lettering). ...
1
by: Tom L | last post by:
I'm pretty new to .net stuff, but not new to programming (lots of vb, sql, cold fusion, and some asp).. I have a "middle layer" object model I created, that has all my business rules and database...
4
by: Grigs | last post by:
Hello, I have a fairly simple class that I created and it works great. Basically it remembers a certain amount of strings. When a new one comes in the oldest drops off. The problem is, when I...
7
by: Alan Silver | last post by:
Hello, I've just been looking at the free PayPal component from ComponentOne and am somewhat amazed how insecure it is. They include all the transaction details in plain text in the querystring,...
2
by: AMDRIT | last post by:
Hello everyone, I have created a custom component and one of its properties is a class object with it's own properties. During runtime, I can assign values to the class object properties just...
11
by: Peted | last post by:
Im using c# 2005 express edition Ive pretty much finished an winforms application and i need to significantly improve the visual appeal of the interface. Im totaly stuck on this and cant seem...
1
by: Daniel Schmitz | last post by:
hi, how do i generate a javascript code in asp.net custom component ? thanks
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.