منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : لعمل لون متدرج على الفورم
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
كاتب الموضوع : 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)