Hello, I search code in vb.net to text in a drawing to give this letter by letter, at any place on the drawing.
Sorry for my poor English.
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
FroglegRank #1,020 · 1.9K reputationPosted Mar 18, 2011, 12:32 AM EDT
Let me know what you think
FroglegRank #1,020 · 1.9K reputationPosted Mar 13, 2011, 12:18 AM EST
set timer to 1000 (1 sec)
rename button1 to bttnDraw
change picturebox1.backcolor to black
code*********
Imports System.Drawing
Public Class Form1
Dim myFont As Font
Dim cArr() As Char
Dim count As Integer
Dim myString As String
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
myFont = (New Font("Microsoft Sans Serif", 26, FontStyle.Regular))
End Sub
Private Sub bttnDraw_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bttnDraw.Click
If String.IsNullOrEmpty(TextBox1.Text) Then ' if textbox1 has no text, exit sub
Exit Sub
End If
cArr = TextBox1.Text.ToCharArray
Dim i As Integer = cArr.Length
Timer1.Start()
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Dim myother As String = cArr(count)
myString = myString & myother
If count = cArr.Length - 1 Then
Timer1.Stop()
End If
count += 1
PictureBox1.Refresh()
End Sub
Private Sub PictureBox1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles PictureBox1.Paint
e.Graphics.DrawString(myString, myFont, Brushes.Lime, 50, 50)
End Sub
End Class
Jozef Van Nieuwenhuys13 reputationPosted Mar 13, 2011, 11:37 AM EDT
FroglegRank #1,020 · 1.9K reputationPosted Mar 13, 2011, 1:19 PM EDT
Jozef Van Nieuwenhuys13 reputationPosted Mar 14, 2011, 1:09 PM EDT
FroglegRank #1,020 · 1.9K reputationPosted Mar 14, 2011, 5:25 PM EDT
Jozef Van Nieuwenhuys13 reputationPosted Mar 14, 2011, 10:06 PM EDT
Jozef Van Nieuwenhuys13 reputationPosted Mar 17, 2011, 1:13 PM EDT
FroglegRank #1,020 · 1.9K reputationPosted Mar 17, 2011, 1:16 PM EDT
Jozef Van Nieuwenhuys13 reputationPosted Mar 17, 2011, 9:45 PM EDT
Jozef Van Nieuwenhuys13 reputationPosted Mar 21, 2011, 10:39 AM EDT
Jef