المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : مساعده في برنامج فيجوال بيسك 5


المتهوره
09-May-2012, 04:03 PM
السلام عليكم ورحمه الله وبركاته
لوسمحتم يا اعضاء المنتدى محتاجه لمساعده في برنامج عندي بالفيجوال بيسك 5 وسؤال البرنامج هو
3) Define a 10X10 bitmap that contains a green face, black eyebrows, blue eyes, red nose and a yellow smile. Then use this bitmap to fill a rectangle of size 100X100.
ويكون الشكل كذا :)بس الالوان متغيره مثل ماهو مطلوب في السؤال
وأنا حاولت احله وهذي طريقه حلي

' Drawing a shape on a form.
Imports System.Drawing.Drawing2D

Public Class Form1

Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint

' references to object we will use
Dim graphicsObject As Graphics = e.Graphics
Dim d As Rectangle = New Rectangle(5, 35, 100, 100)
Dim li As LinearGradientBrush = New LinearGradientBrush(d, Color.Green, Color.Green, LinearGradientMode.ForwardDiagonal)
Dim te As Bitmap = New Bitmap(10, 10)
Dim g2 As Graphics = Graphics.FromImage(te)
Dim solidColorBrush As SolidBrush = New SolidBrush(Color.Red)
Dim coloredPen As Pen = New Pen(solidColorBrush)
graphicsObject.FillEllipse(li, 5, 30, 65, 100)

coloredPen.Color = Color.Blue
g2.DrawEllipse(coloredPen, 80, 80, 120, 120)

solidColorBrush.Color = Color.Blue
g2.FillEllipse(solidColorBrush, 80, 80, 60, 60)
Dim texturedBrush As TextureBrush = New TextureBrush(te)
graphicsObject.FillRectangle(texturedBrush, 10, 10, 230, 230)


End Sub
End Class
وياليت تردون علي قبل يوم الثلاثاء
وشكرررررررررررررررررررا