1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
Protected Overrides Sub OnPaint(e As PaintEventArgs)
e.Graphics.TextRenderingHint = TextRenderingHint.AntiAliased
e.Graphics.FillRectangle(new SolidBrush(Color.White), ClientRectangle)
Try
Dim japaneseFont As New Font("MS Mincho", 32)
Dim japaneseText As New String(new char() {CType(31169, Char), CType(12398, Char),
_CType(21517, Char), CType(21069, Char), CType(12399, Char),
_CType(12463, Char), CType(12522, Char), CType(12473, Char),
_CType(12391, Char), CType(12377, Char), CType(12290, Char)})
e.Graphics.DrawString(japaneseText, japaneseFont, new SolidBrush(Color.Blue), 20, 40)
Catch ex As Exception
MessageBox.Show("You need to install the Japanese language pack to run this sample")
Application.Exit()
End Try |
Partager