منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب
لعمل لون متدرج على الفورم - نسخة قابلة للطباعة

+- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb)
+-- قسم : الأقسام التعليمية - المنتدى القديم (http://vb4arb.com/vb/forumdisplay.php?fid=90)
+--- قسم : مكتبة أكواد المنتدى (http://vb4arb.com/vb/forumdisplay.php?fid=111)
+---- قسم : مكتبة أكواد .net (http://vb4arb.com/vb/forumdisplay.php?fid=117)
+---- الموضوع : لعمل لون متدرج على الفورم (/showthread.php?tid=6187)



لعمل لون متدرج على الفورم - RaggiTech - 17-10-12

كاتب الموضوع : AhmedEssawy


كود :
'In the Form_Paint event. Put the following code

Dim rec As Rectangle = New Rectangle(0, 0, Me.Width, Me.Height) 'create a new recatangle


'Create a new brush. Make is a Gradient style brush.


Dim myBrush As Brush = New Drawing.Drawing2D.LinearGradientBrush(rec, Color.Aqua, Color.Yellow, _


Drawing.Drawing2D.LinearGradientMode.ForwardDiagonal)


'draw the gradient onto the form.


e.Graphics.FillRectangle(myBrush, rec)