English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have this code to print some text:

---
Private Sub frmPrint_Load...
txtPrint.Text = strName & ", You Got " & intPerc & "Completed on " & Date.Today

Try
Dim printdoc As New PrintDocument
AddHandler printdoc.PrintPage, AddressOf Me.printtext
printdoc.Print()
Catch ex As Exception
MessageBox.Show("There is a problem printing, please check with your teacher", _
ex.ToString())
End Try
MsgBox("Your certificate has been sent to the printer")
Me.Close()
frmResultHigh.Show()
End Sub
---
Private Sub printtext...
ev.Graphics.DrawString(txtPrint.Text, New Font("Century Gothic", 24, FontStyle.Bold), Brushes.Black, 120, 120)
ev.HasMorePages = False
End Sub
---

Is there any way to make the lines of text on different lines on the printout, as obviously it all comes out on the same line at the moment, and is there any way to insert a pic after the text e.g.

---
Well Done

Name

Score

PICTURE
----

Cheers

2007-02-20 10:22:40 · 2 answers · asked by Anonymous in Computers & Internet Programming & Design

2 answers

reate a string like:

dim strFirstRow as string="qwertyuop"

it's 9 letters.. now generate a random number from 1 to 9 and then get that letter from your string

something like this

Dim strFirstRow As String = "qwertyuop"
Dim myRND As New Random

Dim iNum As Integer = myRND.Next(1, 9)
MsgBox(strFirstRow.Substring(i... 1))

2007-02-28 04:00:23 · answer #1 · answered by Freddy Krueger 3 · 1 0

don't have a clue to your question, just felt sorry for you cos no-one had answered your question and i didn't want you to feel left out.

2007-02-25 12:54:23 · answer #2 · answered by Anonymous · 0 0

fedest.com, questions and answers