20-02-17, 07:34 PM
الصفحات : 1 2
24-02-17, 06:37 AM
هفففففففففففففففففففففف
11-11-20, 04:51 AM
السلام عليكم فية حل كويس للموضوع دة بعد اذن الشباب طبعا
1-تنشيء Class جديد وتخلي اسمة TransparentPictureBox
2-بعد كدا حط الكود دة داخل ال Class
3- اعمل Build للمشروع
4-هتروح على ToolBox هتلاقي اداة جديدة اسمها TransparentPictureBox
5- اسحب الاداة على الفورم واضيف ليها الصورة الي انت عاوزها
1-تنشيء Class جديد وتخلي اسمة TransparentPictureBox
2-بعد كدا حط الكود دة داخل ال Class
كود :
Public Class TransparentPictureBox
Inherits PictureBox
Protected Overrides Sub OnPaintBackground(e As System.Windows.Forms.PaintEventArgs)
MyBase.OnPaintBackground(e)
If Parent IsNot Nothing Then
Dim index As Integer = Parent.Controls.GetChildIndex(Me)
For i As Integer = Parent.Controls.Count - 1 To index + 1 Step -1
Dim c As Control = Parent.Controls(i)
If c.Bounds.IntersectsWith(Bounds) AndAlso c.Visible = True Then
Dim bmp As New Bitmap(c.Width, c.Height, e.Graphics)
c.DrawToBitmap(bmp, c.ClientRectangle)
e.Graphics.TranslateTransform(c.Left - Left, c.Top - Top)
e.Graphics.DrawImageUnscaled(bmp, Point.Empty)
e.Graphics.TranslateTransform(Left - c.Left, Top - c.Top)
bmp.Dispose()
End If
Next
End If
End Sub
End Class3- اعمل Build للمشروع
4-هتروح على ToolBox هتلاقي اداة جديدة اسمها TransparentPictureBox
5- اسحب الاداة على الفورم واضيف ليها الصورة الي انت عاوزها
الصفحات : 1 2