Skip to content
프로젝트

소개

This is a simple desktop application built with C# and WinForms that simulates the basic functionality of the classic Microsoft Paint. It allows users to draw shapes, use different colors and brush sizes, and interact with a canvas using mouse events.

디자인 및 미디어

이 수치를 측정하는 방법

What you can do

  • Draw lines, rectangles, ellipses, and freehand shapes
  • Change pen color and thickness
  • Fill shapes with colors
  • Save your drawing

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
+1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Paint Application (C#)

Welcome to my Paint application — one of the first major challenges I tackled when I started learning C#. This project holds a special place in my journey as a developer, and it's a fun attempt to simulate the basic functionality of the classic MS Paint application.

Features

  • Draw lines, rectangles, ellipses, and freehand shapes
  • Change pen color and thickness
  • Fill shapes with colors
  • Erase content
  • Clear canvas
  • Save your drawing

Screenshots

image

Demo GIF

PaintDemo_2


Project Goals

The main goal of this project was to simulate the basic functionalities of the classic Microsoft Paint application using C# and WinForms. The focus was on learning graphical programming concepts, handling user inputs, and building an interactive desktop UI. It served as a hands-on project to understand:

  • Event-driven programming
  • Drawing graphics on a canvas
  • Real-time mouse interaction
  • Building user-friendly interfaces

Architecture Overview

The project follows a simple structure, designed for learning and experimentation rather than scalability. Here's an overview of how it's built:

  • Windows Forms (WinForms): Used for the UI and drawing surface.
  • Main Form (UI Layer): Contains buttons, color selectors, and the drawing canvas.
  • Drawing Logic: Handles mouse events (Down, Move, Up) to draw on the canvas using the Graphics object.
  • State Management: Keeps track of selected tool, color, brush size, and drawing mode.

Technical Details

  • Language: C#
  • Framework: .NET Framework (WinForms)
  • Drawing Surface: PictureBox or a custom panel used to handle drawing.
  • Rendering: Uses Graphics class for shapes and freehand lines.
  • Mouse Events: MouseDown, MouseMove, and MouseUp events are used for drawing actions.
  • Brush Settings: Allows changing color and pen width dynamically.
  • Save Feature: Exports the drawing as an image file using Bitmap and SaveFileDialog.

How to Run

  1. Clone the repository:

    git clone https://github.com/AmirAbdollahi/paint.git
    
  2. Open the solution file (Paint.sln) in Visual Studio.

  3. Build and run the project.

Motivation

This was a self-challenge project during my early days of learning C#. I wanted to explore how to handle graphics, user input, and WinForms events. It helped me gain a deeper understanding of Windows desktop development and UI rendering.

What I Learned

  • Drawing on Graphics objects
  • Managing user interactions like mouse movements
  • Handling UI components and events in WinForms
  • Basics of color and shape manipulation in a GUI

Acknowledgments

Inspired by the classic Microsoft Paint and my curiosity about how drawing tools work behind the scenes.

Contribution

Feel free to explore, fork, or improve this project. I'd love to see what you come up with!

관련 프로젝트 살펴보기

불러오는 중…