Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 vb.net help

views
     
TSbradley83
post Mar 4 2006, 09:20 PM, updated 20y ago

Getting Started
**
Junior Member
66 posts

Joined: Feb 2005


e.Graphics.DrawString(txtOriginal.Text, New Font("Courier New", 10, FontStyle.Regular), Brushes.Black, 50, 50)

after i debug it said "too many arguments to pulic sub new"(underline)
then i reduce but still same error.
anthony_yio
post Mar 9 2006, 10:25 PM

........
Group Icon
Elite
1,828 posts

Joined: Jan 2003


QUOTE(bradley83 @ Mar 4 2006, 09:20 PM)
e.Graphics.DrawString(txtOriginal.Text, New Font("Courier New", 10, FontStyle.Regular), Brushes.Black, 50, 50)

after i debug it said "too many arguments to pulic sub new"(underline)
then i reduce but still same error.
*
You are calling the constructor of


Public Sub New( _
ByVal familyName As String, _
ByVal emSize As Single, _
ByVal style As FontStyle _
)

It is not the Font constructor problem. The number and type of parameters are valid. More of like syntax error.

Try
Dim myFont As New Font("Arial", 16)
and then pass it the the DrawString.






 

Change to:
| Lo-Fi Version
0.0119sec    0.61    5 queries    GZIP Disabled
Time is now: 24th December 2025 - 01:33 AM