دسته
آرشیو
آمار وبلاگ
تعداد بازدید : 3108
تعداد نوشته ها : 10
تعداد نظرات : 0
Rss
طراح قالب

 توسط این سورس کد می توانید روی پنجره ها نقاشی بکشید.

Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Dim Cl As Boolean

Private Sub Form_Load()
Dim DC As Long
Me.WindowState = 2
Me.AutoRedraw = True
DC = GetDC(GetDesktopWindow)
BitBlt Me.hDC, 0, 0, Width, Height, DC, 0, 0, vbSrcCopy
End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
Cl = True
PSet (X, Y)
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Cl = True Then Line -(X, Y)
End Sub

Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
Cl = False
End Sub

 


دسته ها : گرافیک - هندل
جمعه بیست و یکم 1 1388
X