Results 1 to 10 of 10

Thread: PLease Help me with my Paint Program...

  1. #1
    New Member Aphrael_87's Avatar
    Join Date
    Nov 2004
    HSC
    N/A
    Gender
    Female
    Location
    Wollongong
    Posts
    22
    Rep Power
    11

    Red face PLease Help me with my Paint Program...

    Ok, here's the deal, Im just about to begin writing a Paint Program in VB, has anyone done that before? Ive never encountered this, and im not sure on how to do it, i just fiished a number puzzle game, and im soooooo over arrays, do i need to use arrays? Any help would be greatly appreciated
    ~AmBiE~

  2. #2
    VIVE LA FRANCE Bunny04's Avatar
    Join Date
    Oct 2004
    HSC
    2004
    Gender
    Female
    Location
    Well for starters, Australia, NSW, Sydney- and finally- the east.
    Posts
    999
    Rep Power
    11
    wouldnt have a clue, we didnt even do the major project *thinks back* Nope didnt do it
    Bachelor Music (Performance)
    Sydney Conservatorium of Music

  3. #3
    New Member Aphrael_87's Avatar
    Join Date
    Nov 2004
    HSC
    N/A
    Gender
    Female
    Location
    Wollongong
    Posts
    22
    Rep Power
    11

    Smile

    Tis cool, thanks anyway
    ~AmBiE~

  4. #4
    Cadet
    Join Date
    Nov 2004
    HSC
    2005
    Gender
    Female
    Location
    Nth Rocks (near parra)
    Posts
    26
    Rep Power
    11
    Yes! You will have to use ARRAYS... i know its hard... but yeh... u *do* have to use them!!!
    Wat kind of game are you making?

  5. #5
    I could be your Doctor... Fosweb's Avatar
    Join Date
    Jun 2003
    HSC
    2003
    Gender
    Male
    Location
    UNSW. Still.
    Posts
    594
    Rep Power
    12
    Simple.

    1. Set up a picture box with a scale horizontal and vertical.
    2. Get the position the user clicks with the mouse in terms of X and Y.
    3. Change the colour of the coordinate that corrosponds to the X and Y of the mouseclick.

    Blah. Simple.
    FOSTER - HTTP://FOSWEB.COM

    You know, the warning 'If they touch you, they'll make you go insane'
    would have been great before they touched me and I went insane...

    Me: Med III @ UNSW 2006

  6. #6
    :o>---<
    Join Date
    Aug 2004
    HSC
    N/A
    Gender
    Male
    Posts
    3,004
    Rep Power
    13
    Haha, nice summary. We had a paint component of our major project, worked great

  7. #7
    New Member Aphrael_87's Avatar
    Join Date
    Nov 2004
    HSC
    N/A
    Gender
    Female
    Location
    Wollongong
    Posts
    22
    Rep Power
    11
    Quote Originally Posted by BabieBubski
    Yes! You will have to use ARRAYS... i know its hard... but yeh... u *do* have to use them!!!
    Wat kind of game are you making?
    Its a Paint Program, so far i can draw circles ^_^yay!!! Thanks.
    ~AmBiE~

  8. #8
    New Member elspethlove's Avatar
    Join Date
    Nov 2004
    HSC
    2005
    Gender
    Female
    Location
    Wollongong
    Posts
    2
    Rep Power
    11

    Talking

    yeah you do have to use arrays. You also have to create a button to intsert every HP pics you can see? thats how you pass, don't worry, it'll be *cute*

  9. #9
    I could be your Doctor... Fosweb's Avatar
    Join Date
    Jun 2003
    HSC
    2003
    Gender
    Male
    Location
    UNSW. Still.
    Posts
    594
    Rep Power
    12
    Quit it with arrays!

    All you need to do is track where to mouse goes when you push the mouse button over the picture box. And then draw those pixels.

    Now you want to get when the person presses the mouse, and when they move the mouse, so the same code goes in both the mouseDown and mouseClick events...

    Add a picturebox called picMain to your form
    Code:
    Private Sub picMain_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    
    If Button = 1 Then
        picMain.PSet (X, Y), vbBlack
    End If
    
    End Sub
    Button = 1 [this is the left mouse button]
    .PSet draws a pixel, X, Y are coords, vbBlack takes the place of whatever colour you want there... Make that a variable, and get the user to select the colour from a common dialog (the colourpicker one...)

    yay... very primitive... very...
    Last edited by Fosweb; 19 Nov 2004 at 5:05 PM.
    FOSTER - HTTP://FOSWEB.COM

    You know, the warning 'If they touch you, they'll make you go insane'
    would have been great before they touched me and I went insane...

    Me: Med III @ UNSW 2006

  10. #10
    I could be your Doctor... Fosweb's Avatar
    Join Date
    Jun 2003
    HSC
    2003
    Gender
    Male
    Location
    UNSW. Still.
    Posts
    594
    Rep Power
    12
    More things for you to think about:

    - The .DrawWidth property of a picture box. (Will change the 'thickness' or width of a line or pixel.

    - An eraser is just white (vbWhite) coloured pen

    - Lines are drawn with a start X,Y coordinate, collected from the mouseDown event, and a finish X,Y coordinate, from the mouseUp event

    - Circles are .Circle ( you know this)

    - .Cls you should know as clearscreen.
    FOSTER - HTTP://FOSWEB.COM

    You know, the warning 'If they touch you, they'll make you go insane'
    would have been great before they touched me and I went insane...

    Me: Med III @ UNSW 2006

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •