1 Attachment(s)
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 :
http://www.vbfrance.com/gdi/c/54353.cs.jpg
You can dowload the source from Attachment Files
Or
This is an external link [Mediafire]
http://www.mediafire.com/?1r3jaapk2f4b3o5
Enjoy !!
Re: Professional Paint [Code Source]
Moved to the CodeBank forum
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
Re: Professional Paint [Code Source]
Quote:
Originally Posted by
Joacim Andersson
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 :wave:
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
,,,
Re: Professional Paint [Code Source]
Quote:
Originally Posted by
mjohnlq
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
Re: Professional Paint [Code Source]
Re: Professional Paint [Code Source]
Quote:
Originally Posted by
Bonnie West
Impressive! :thumb:
Thanks Bonnie