Parsi Coders
ترسیم خطوط - نسخه قابل چاپ

+- Parsi Coders (http://parsicoders.com)
+-- انجمن: Software Development Programming (http://parsicoders.com/forumdisplay.php?fid=37)
+--- انجمن: Visual Basic Programming (http://parsicoders.com/forumdisplay.php?fid=39)
+---- انجمن: Visual Basic 6 (http://parsicoders.com/forumdisplay.php?fid=44)
+---- موضوع: ترسیم خطوط (/showthread.php?tid=2489)



ترسیم خطوط - Thewolf - 06-23-2012

با کد زیر می توانید خط های جالبی را رسم کنید

کد:
Option Explicit


'TheWolf
'Www.Parsicoders.com

Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long

Private Sub Form_Load()
Me.BackColor = vbWhite
Me.AutoRedraw = True
ShowCursor 0
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Cls
Me.Line (0, 0)-(X, Y)
Me.Line (Width, 0)-(X, Y)
Me.Line (Width / 2, 0)-(X, Y)
Me.Line (0, Height)-(X, Y)
Me.Line (0, Height / 2)-(X, Y)
Me.Line (Width, Height / 2)-(X, Y)
Me.Line (Width, Height)-(X, Y)
Me.Line (Width / 2, Height)-(X, Y)
Me.Circle (Int(X), Int(Y)), 500
End Sub

Private Sub Form_Unload(Cancel As Integer)
ShowCursor 1
End Sub

جالب بود! نه؟