Results 1 to 8 of 8

Thread: Professional Paint [Code Source]

  1. #1
    New Member
    Join Date
    Jun 12
    Posts
    4

    Professional Paint [Code Source]

    This is a Professional Paint with some features from Photoshop.
    You can learn how to deal with pictures using VB 6.
    Here's a picture :


    You can dowload the source from Attachment Files
    Or
    This is an external link [Mediafire]
    http://www.mediafire.com/?1r3jaapk2f4b3o5



    Enjoy !!
    Attached Files Attached Files

  2. #2
    Super Moderator Joacim Andersson's Avatar
    Join Date
    Jan 99
    Location
    Sweden
    Posts
    13,366

    Re: Professional Paint [Code Source]

    Moved to the CodeBank forum
    Joacim Andersson
    Microsoft MVP, MCSD, MCSE, Sun Certified Java Programmer
    If anyone's answer has helped you, please show your appreciation by rating that answer.
    I'd rather run ScriptBrix...
    Joacim's view on stuff.

  3. #3
    Super Moderator Joacim Andersson's Avatar
    Join Date
    Jan 99
    Location
    Sweden
    Posts
    13,366

    Re: Professional Paint [Code Source]

    Nice work. I did notice that the scrollbars gets placed wrong though. The problem is that when you calculate the position of the scrollbars you use the Height and Width of the Form and subtract an arbitrary number from that, which I guess places the scrollbars correctly on your computer. The thing is that the height of the title bar of the Form and the border size may be different on different computers. What you should use is the ScaleWidth and ScaleHeight of the Form instead since that is the client size of the Form (where you can actually put controls).
    Code:
          If .Visible Then
            .Left = Me.ScaleWidth - .Width
            If hscPaint.Visible Then
              .Height = Me.ScaleHeight - fraColor.Height - hscPaint.Height
            Else
              .Height = Me.ScaleHeight - fraColor.Height
            End If
          End If
    The above is for the vertical scrollbar and the following for the horizontal one:
    Code:
            If vscPaint.Visible Then
              .Width = Me.ScaleWidth - fraTools.Width - vscPaint.Width 
            Else
              .Width = Me.ScaleWidth - fraTools.Width 
            End If
    Joacim Andersson
    Microsoft MVP, MCSD, MCSE, Sun Certified Java Programmer
    If anyone's answer has helped you, please show your appreciation by rating that answer.
    I'd rather run ScriptBrix...
    Joacim's view on stuff.

  4. #4
    New Member
    Join Date
    Jun 12
    Posts
    4

    Re: Professional Paint [Code Source]

    Quote Originally Posted by Joacim Andersson View Post
    Nice work. I did notice that the scrollbars gets placed wrong though. The problem is that when you calculate the position of the scrollbars you use the Height and Width of the Form and subtract an arbitrary number from that, which I guess places the scrollbars correctly on your computer. The thing is that the height of the title bar of the Form and the border size may be different on different computers. What you should use is the ScaleWidth and ScaleHeight of the Form instead since that is the client size of the Form (where you can actually put controls).
    Code:
          If .Visible Then
            .Left = Me.ScaleWidth - .Width
            If hscPaint.Visible Then
              .Height = Me.ScaleHeight - fraColor.Height - hscPaint.Height
            Else
              .Height = Me.ScaleHeight - fraColor.Height
            End If
          End If
    The above is for the vertical scrollbar and the following for the horizontal one:
    Code:
            If vscPaint.Visible Then
              .Width = Me.ScaleWidth - fraTools.Width - vscPaint.Width 
            Else
              .Width = Me.ScaleWidth - fraTools.Width 
            End If
    ouh Thanks man , that was so nice

  5. #5
    Junior Member
    Join Date
    Aug 11
    Posts
    18

    Re: Professional Paint [Code Source]

    very good!
    in my computer
    If .Visible Then
    .Left = Me.ScaleWidth - .Width
    ....
    is better than
    If .Visible Then
    .Left = Me.Width - .Width - 110
    ,,,

  6. #6
    New Member
    Join Date
    Jun 12
    Posts
    4

    Re: Professional Paint [Code Source]

    Quote Originally Posted by mjohnlq View Post
    very good!
    in my computer
    If .Visible Then
    .Left = Me.ScaleWidth - .Width
    ....
    is better than
    If .Visible Then
    .Left = Me.Width - .Width - 110
    ,,,
    Thanks mjohnlq

  7. #7
    Frenzied Member Bonnie West's Avatar
    Join Date
    Jun 12
    Location
    InIDE
    Posts
    1,567

    Thumbs up Re: Professional Paint [Code Source]

    Impressive!

  8. #8
    New Member
    Join Date
    Jun 12
    Posts
    4

    Re: Professional Paint [Code Source]

    Quote Originally Posted by Bonnie West View Post
    Impressive!
    Thanks Bonnie

Posting Permissions

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