일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
- allauth
- SQL
- Django-allauth
- GraphQL
- flask
- python
- check_password
- array
- numpy
- FastAPI
- for loop
- tkinter Radio 동적버튼
- Django
- graphene-django
- Today
- Total
객
[ VB 2008 ] DrawLine 예제 본문
Imports System.Windows.Forms
Imports System.Drawing.Graphics
Public Class Form3
' 프로그램명 : 사각형 그리기
' 제작일 : 2010. 01. 08
' 제작자 : 객과 함께.
Dim RcDraw As Rectangle
Dim Rc As New Rectangle
Private Sub Form3_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
RcDraw.X = e.X
RcDraw.Y = e.Y
End Sub
Private Sub Form3_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseUp
Rc.X = e.X
Rc.Y = e.Y
If Rc.X = 0 And Rc.Y = 0 Then Exit Sub
Form3Paint()
End Sub
Private Sub Form3Paint()
Dim LinePen As New Pen(Color.Red, 1)
Dim G As Graphics = Me.CreateGraphics()
G.DrawLine(LinePen, RcDraw.X, RcDraw.Y, Rc.X, Rc.Y)
End Sub
Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.WindowState = FormWindowState.Maximized
Me.Text = " DrawLine 예제 "
End Sub
End Class
[ 실행 화면 ]
짜고 보니 허접 하네...쩝 .....
'[PL] > VB & VB.NET' 카테고리의 다른 글
[ vb 2008] DrawArc 예제. (0) | 2010.01.08 |
---|---|
[ VB 2008 ] DrawRectangle 예제 (0) | 2010.01.08 |
[ VB 2008 ]외부 프로그램 실행 하기........ (0) | 2010.01.07 |
[ vb 2008 ] 투명창 예제 (0) | 2010.01.06 |
[ vb 2008 ] Calendar 예제 (0) | 2010.01.05 |