폼에 문자 그리기
*
Public Class Form1

Private Sub Form1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint

'출력할 문자열
Dim st As String = "Drawing in VB!"
Dim st1 As String = "Drawing is funny."

'Create font object
'Create brush object
Dim f As New Font("Courier New", 15, FontStyle.Bold)
Dim br As New SolidBrush(Color.Coral)

'Create point objects
Dim pt As New Point(10, 10)
Dim pt1 As New Point(10, 60)

'Ready to draw nice text
e.Graphics.DrawString(st, f, br, pt)
e.Graphics.DrawString(st1, f, br, pt1)


End Sub
End Class

bbb.JPG

폼상에 문자를 그리는 소스 입니다

폼 속성에서 Paint 이벤트를 연결 시켜줘야 합니다

aaa.JPG

이 게시물을

공유하기

SEARCH

MENU NAVIGATION