اخواني الاعزاء
طريقة عمل فورم علي شكل دائره ثم تحريكه باستخدام الماوس
يمكن استخدام ذلك مع الفيجوال ستوديو
نسخة 2005 و نسخة 2008 دوت نت
يمكن عمل صوره باي برنامج جرافيك واستخدامها كخلفيه مثلا
ودي اول الطريق لعمل Skin للبرنامج بتاعك
رجاء قراءة الملاحظات
وضبط الفورم طبقا للبيانات الموجوده في الملاحظات
اعتقد الامر متروك الان لكم في انتاج اشكال اخري
'
General Notes
' To Do
' in form properties window
' set the size of form to (425, 425)
' set the backcolor to black for example
' set the formborderstyle to None
' set the form start position to centertoscreen
' add the following code to the form
Private MoveToNewPoint As New Point
Private frmDragg As Boolean = False
Private frmPointClicked As Point
Private Sub SetFormRegion(ByVal e As PaintEventArgs)
Dim shape As New System.Drawing.Drawing2D.GraphicsPath
shape.AddEllipse(0, 0, 425, 425)
Me.Region = New System.Drawing.Region(shape)
End Sub
Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
MyBase.OnPaint(e)
SetFormRegion(e)
End Sub
Private Sub Form1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseDown
frmDragg = True
frmPointClicked = New Point(e.X, e.Y)
End Sub
Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
If frmDragg Then
'Use the current mouse position to find the target location.
MoveToNewPoint = Me.PointToScreen(New Point(e.X, e.Y))
'Adjust the position based on where you started.
MoveToNewPoint.Offset(frmPointClicked.X * -1, _
(frmPointClicked.Y + SystemInformation.CaptionHeight + _
SystemInformation.BorderSize.Height) * -1)
'Move the form.
Me.Location = MoveToNewPoint
End If
End Sub
Private Sub Form1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseUp
frmDragg = False
End Sub
مع خالص تحياتي لكم
اخوكم عمر