الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

Make Paint Brush Easy

بدأه ahmed.bohoty في 28 نوفمبر 2008 · 5 رد · 1,993 مشاهدة · في Microsoft Visual C#.NET
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

I publish this article in codeproject and i hope from allah to be benefit for all

Download Source Code :

http://www.up.6y6y.com/uploads/d18978929c.rar

1.gif

Introduction

Paint Brush tool is similar to the pencil (Free hand) with more features. It too can be used in different colors, the shape and size of the Paint Brush can also be changed.

Project Idea

2.gif

Global Variable

3.gif

Steps

In mouse down

4.gif

In mouse move

5.gif

Problem

If we run the previous code, the free hand will work but if we stop in drawing we will note that , pen is still drawing however the mouse up so we will make flag and test through it where flag will be true if mouse down and set flag to be false while mouse up.

6.gif

7.gif

8.gif

Change Color of Pencil

9.gif

Steps:

In event of Label : make all label in one event

10.gif

Note: I add flag named colorflag because I give default color to pen when app run first , I depend on getting color if user press click on label so if I do not make this flag and user start to draw without choose color exception will occur, so I avoid this by given default color and if make something like sensor to know if user click on label and if this done I will switch to take user color.

Change Size of pencil

11.gif

Surprise!!!

After we ended from paint brush if we minimize the form to taskbar we will note that the form not contains any graphics and like a blank page.

Solution

I will class that store each point p1, p2 and pen and for each line I do I will store it in Arraylist then I will retrieve data stored in Arraylist in event Paint.

13.gif

Save Your Image

14.gif

Future develpoement

if Allah wishes i will add the following to the following

add undo & redo to lines.

open image

make paint brush client-server[/align]

]]]]]Author:Ahmed Rabie El Bohoty

تم تعديل هذه المشاركة بواسطة ahmed.bohoty في 28 نوفمبر 2008 في 17:30

صلى الله عليك وسلم ياحبيبى يارسول الله

Visit My Technical Blog

http://ahmedbohoty.blogspot.com/

#2

بر نامج حلو بتذكر انا وضعت برنامج الرسام في المنتدي

لو نقدر نطور البرنامج و نطور عليه و نتساعد الاعضاء مع بعض و نضع الكثير من خصائص الجرفيك الخاصة بالكود و الكل يستفيد منو

انا منتظر ردرودك اذا بنتشارك و نعمل موضع يخص هذا المنتج (الرسام)

شكراahmed.bohoty

FOTA KHader FAR

سوف اتجة الى عالم الويب

thumb_kujviv1t1.jpg

#3

أخي مشكور على البرنامج والكود الرائع

وأنا أحب أضف إضافة أخرى

هناك برنامج اسمه Paint.NET تم تصميمه بالدوت نت 3.5 وهناك نسخ أخرى بالدوت نت 2.0

المهم البرنامج مجاني وبالسورس كود ومش هتصدق لو قلتلك إنه فيه إمكانيات كتير زي الـ Photoshop حتى إنه بيسمحلك إنك تستخدم Layers

ودي صورة من البرنامج

والموقع بتاع البرنامج:

http://www.paint.net

وأما رابط تحميل أحدث نسخة حتى الآن Paint.NET 3.36:

http://www.download.com/Paint-NET/3000-219...&tag=button

أتمنى إن الجميع يستفيدوا من البرنامج ده

post-113763-1227953364_thumb.gif

#4

بارك الله فيك اخي.

[وسط]لا اله الا انت سبحانك انى كنت من الظالمين

[/وسط]

#5

ان شاء الله لو حد عايز اننا نطور المشروع ويبقى مشرو كامل ياريت الشبابا يقولوا افكارهم ويقدروا يساعدوا بى اية .

صلى الله عليك وسلم ياحبيبى يارسول الله

Visit My Technical Blog

http://ahmedbohoty.blogspot.com/

#6

يا ريت والله

مواضيع مشابهة