• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
projectsgeek

ProjectsGeek

Download Mini projects with Source Code, Java projects with Source Codes

  • Home
  • Java Projects
  • C++ Projects
  • VB Projects
  • PHP projects
  • .Net Projects
  • NodeJs Projects
  • Android Projects
    • Project Ideas
      • Final Year Project Ideas
      • JSP Projects
  • Assignment Codes
    • Fundamentals of Programming Language
    • Software Design Laboratory
    • Data Structure and Files Lab
    • Computer Graphics Lab
    • Object Oriented Programming Lab
    • Assembly Codes
  • School Projects
  • Forum

Design and Develop features of Paint Brush application

July 12, 2011 by ProjectsGeek 5 Comments

Paint software in visual basic is simple paint program which is capable of drawing simple figures and coloring them. It has some features like spray color , pencil , picture draw options  .

Question :

Design and Develop features of Paint Brush application.

 Dim sx, sy As Single  
 Dim px As Integer  
 Dim py As Integer  
 Dim flag As Integer  
 Private Sub spray(X As Single, Y As Single, col As ColorConstants)  
 Dim i As Integer  
 Dim tempx As Integer  
 Dim tempy As Integer  
 For i = 1 To 10 Step 1  
 tempx = Rnd * 50  
 tempy = Rnd * 50  
 fradraw.PSet (X + tempx, Y + tempy), col  
 Next i  
 End Sub  
 Private Sub Form_Activate()  
 sx = 0  
 sy = 0  
 End Sub  
 Private Sub fradraw_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)  
 If Button <> 0 Then  
 sx = X  
 sy = Y  
 End If  
 End Sub  
 Private Sub fradraw_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)  
 Dim col As ColorConstants  
 If Button = 1 Then  
 col = piccur(1).BackColor  
 ElseIf Button = 2 Then  
 col = piccur(0).BackColor  
 End If  
 If Button <> 0 Then  
 Select Case flag  
 Case 1  
 Call spray(X, Y, col)  
 Case 2  
 Case 3  
 fradraw.Line (sx, sy)-(X, Y), col  
 sx = X  
 sy = Y  
 Case 4  
 fradraw.Line (sx, sy)-(px, py), vbWhite  
 fradraw.Line (sx, sy)-(X, Y), col  
 px = X  
 py = Y  
 Case 5  
 fradraw.Line (sx, sy)-(px, sy), vbWhite  
 fradraw.Line (px, sy)-(px, py), vbWhite  
 fradraw.Line (px, py)-(sx, py), vbWhite  
 fradraw.Line (sx, py)-(sx, sy), vbWhite  
 fradraw.Line (sx, sy)-(X, sy), col  
 fradraw.Line (X, sy)-(X, Y), col  
 fradraw.Line (X, Y)-(sx, Y), col  
 fradraw.Line (sx, Y)-(sx, sy), col  
 px = X  
 py = Y  
 Case 6  
 Case 7  
 fradraw.Line (sx, sy)-(px, sy), vbWhite  
 fradraw.Line (px, sy)-(px, py), vbWhite  
 fradraw.Line (px, py)-(sx, py), vbWhite  
 fradraw.Line (sx, py)-(sx, sy), vbWhite  
 fradraw.Line (sx, sy)-(X, sy), col  
 fradraw.Line (X, sy)-(X, Y), col  
 fradraw.Line (X, Y)-(sx, Y), col  
 fradraw.Line (sx, Y)-(sx, sy), col  
 px = X  
 py = Y  
 Case 8  
 fradraw.Circle (Abs((sx + px) / 2), Abs((sy + py) / 2)), Abs((sx - px) / 2), vbWhite  
 fradraw.Circle (Abs((sx + X) / 2), Abs((sy + Y) / 2)), Abs((sx - X) / 2), col  
 px = X  
 py = Y  
 End Select  
 End If  
 End Sub  
 Private Sub fradraw_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)  
 Dim a As String  
 Select Case flag  
 Case 7  
 a = InputBox("Enter a string", "String Input")  
 fradraw.ScaleMode = vbPixels  
 fradraw.CurrentX = sx + 10  
 fradraw.CurrentY = sy + 20  
 fradraw.Print a  
 fradraw.Line (sx, sy)-(px, sy), vbWhite  
 fradraw.Line (px, sy)-(px, py), vbWhite  
 fradraw.Line (px, py)-(sx, py), vbWhite  
 fradraw.Line (sx, py)-(sx, sy), vbWhite  
 End Select  
 End Sub  
 Private Sub mnuclrimg_Click()  
 fradraw.Cls  
 End Sub  
 Private Sub mnuexit_Click()  
 End  
 End Sub  
 Private Sub piccol_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)  
 If Button = 2 Then  
 piccur(0).BackColor = piccol(Index).BackColor  
 End If  
 If Button = 1 Then  
 piccur(1).BackColor = piccol(Index).BackColor  
 End If  
 End Sub  
 Private Sub pictool_Click(Index As Integer)  
 Select Case Index  
 Case 0  
 fradraw.MouseIcon = LoadPicture("NORMAL01.CUR")  
 flag = 0  
 Case 1  
 fradraw.MouseIcon = LoadPicture("SELECT.CUR")  
 flag = 1  
 Case 2  
 fradraw.MouseIcon = LoadPicture("NORMAL01.CUR")  
 flag = 0  
 Case 3  
 fradraw.MouseIcon = LoadPicture("PENCIL.CUR")  
 flag = 3  
 Case 4  
 fradraw.MouseIcon = LoadPicture("CROSS02.CUR")  
 flag = 4  
 Case 5  
 fradraw.MouseIcon = LoadPicture("CROSS02.CUR")  
 flag = 5  
 Case 6  
 fradraw.MouseIcon = LoadPicture("NORMAL01.CUR")  
 flag = 6  
 Case 7  
 fradraw.MouseIcon = LoadPicture("NORMAL01.CUR")  
 flag = 7  
 Case 8  
 fradraw.MouseIcon = LoadPicture("CROSS02.CUR")  
 flag = 8  
 End Select  
 End Sub  
 Private Sub pictool_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)  
 pictool(Index).BorderStyle = 1  
 End Sub  
 Private Sub pictool_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)  
 pictool(Index).BorderStyle = 0  
 End Sub

Project Download

Other Projects to Try:

  1. Write an Applet that crease a Working Version of Fifteen Puzzle in Java
  2. Text or Screen Editor in C++ Language
  3. Operations on matrices like addition, multiplication, saddle point, magic square ,inverse & transpose
  4. Implement Conflation Algorithm using File Handling in Java
  5. Implementation of Single Pass Algorithm for Clustering

Filed Under: Download Visual Basic Projects

Reader Interactions

Comments

  1. victor says

    November 20, 2014 at 6:40 pm

    Link is broken 🙁

    Reply
    • ProjectsGeek says

      November 23, 2014 at 1:30 pm

      Thanks for reporting, we will try to fix it soon.

    • Victor says

      December 1, 2014 at 8:13 pm

      thank you

    • ishika says

      June 30, 2016 at 11:35 am

      paint brush project file is deleted not downloaded now…

    • ProjectsGeek says

      July 16, 2016 at 12:57 am

      You can copy paste the source code into visual basic IDE and then run the project.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Tags

.Net Projects Download Android Project Ideas Android Projects Angular 2 Assembly Codes C # Projects C & C++ Projects C++ Projects Class Diagrams Computer Graphics Database Project Data Mining Projects DataScience Projects Datastructure Assignments Download Visual Basic Projects Electronics project Hadoop Projects Installation Guides Internet of Things Project IOS Projects Java Java Interview Questions Java Projects JavaScript JavaScript Projects java tutorial JSON JSP Projects Mechanical Projects Mongodb Networking Projects Node JS Projects OS Problems php Projects Placement Papers Project Ideas Python Projects seminar and presentation Struts

Search this Website


Footer

Download Java Project
Download Visual Basic Projects
Download .Net Projects
Download VB Projects
Download C++ Projects
Download NodeJs Projects
Download School Projects
Download School Projects
Ask Questions - Forum
Latest Projects Ideas
Assembly Codes
Datastructure Assignments
Computer Graphics Lab
Operating system Lab
australia-and-India-flag
  • Home
  • About me
  • Contact Form
  • Submit Your Work
  • Site Map
  • Privacy Policy