PDA

Click to See Complete Forum and Search --> : NEED HELP!


*Super Sniper*
Feb 8th, 2000, 11:02 AM
--------------------------------------------------------------------------------
I am making a paint program and I want to be able to sweap the page clean. I want it to look like you are sliding a new page ontop of the old page. Anyone have an idea how to do this?
Also I would like to know if there is any way to save the picture into bitmap format. The entire picture is being made during runtime.
Also does anyone know how you could open a bitmap file into a paint program?

If you know how to do any of this please let me know! Thanks for any help you give me! :)

------------------
www.kaynor.net (http://www.kaynor.net)

Feb 8th, 2000, 05:57 PM
To save a file as a BMP use

SavePicture picture1.Picture, "C:/windows/myfile.bmp"

I took this from an earlier question that was posted. This could then be read back in to a form picture box or image. To clear the screen you could try using the line property to draw a (page) coloured line down the page and gradually move it accross the screen it might work.

*Super Sniper*
Feb 9th, 2000, 06:56 AM
I know how to save the picture. I also figured out a way to clear it the way I wanted. I want to put the picture on to the form for modifation. Anyone know how to load a picture on to a form during runtime? I did this before in a slot macshine program but I was using image boxes then and I want to do it on to a form.

Thanks anyways. :D

------------------
www.kaynor.net (http://www.kaynor.net)

Fox
Feb 9th, 2000, 07:36 AM
You mean

-
Form1.Picture = LoadPicture("C:\Test.bmp")
-

?

------------------
fox_mccloud@gmx.net
...
Every program can be reduced to one instruction which doesn't work.

*Super Sniper*
Feb 11th, 2000, 02:02 PM
Thanks for the help. :)
But: I need to place it part way to the right of the left of the form. :(

Now I have a new question:
How can I do the following tricks in VB?

Do a circle, /, and \ paint without holes when you move the mouse fast(see the microsoft paint for what I mean by no holes, they don't have any)?
Pencil drawing
Pick up color
Zoom
Fill a area(like the paint can in microsoft paint)
Eraser(where it will only erase the color in one of the colors{right click eraser in microsoft paint})
Text(paint style)
Cut
Huge squares and circles(filled, outline, and both

Also how can I make a Manual Drag&Drop?

Thanks in advance. :)

------------------
www.kaynor.net (http://www.kaynor.net)

[This message has been edited by *Super Sniper* (edited 02-12-2000).]

*Super Sniper*
Feb 11th, 2000, 03:15 PM
I figured out how to set the picture to a part of the form. :)

------------------
www.kaynor.net (http://www.kaynor.net)

*Super Sniper*
Feb 16th, 2000, 11:42 AM
!<< UP TO THE TOP >>!

Fox
Feb 17th, 2000, 01:03 AM
I'll ask to some questions...

-Circles-
The easiest way is to set the FillStyle to Solid and draw the circle like this:

-
Picture1.Circle( 10, 20 ), 40
-

There are also API functions but this is the easiest way.


-Pencil drawing-
I don't know what you mean exactly but you can use BitBlt to draw a bitmap anywhere (You can also set it's color but I've no time to explain now).

-Pick up color-
I think you've got a palette bitmap loaded into a picturebox? Well, see this post for an answer: http://www.vb-world.net/ubb/Forum2/HTML/000622.html


-Fill a area-
Use FloodFill from the API:

-
'In module
Public Declare Function FloodFill Lib "gdi32" Alias "FloodFill" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long

'Anywhere
FloodFill Picture1.hDC, 100, 200, RGB(0, 128, 255)
-


Well, like I said, no more time now... sorry, hope this helps anyway.

------------------
fox_mccloud@gmx.net
...
Every program can be reduced to one instruction which doesn't work.

*Super Sniper*
Feb 17th, 2000, 07:53 AM
I am not using a picture box. :(

------------------
Website (http://www.kaynor.net)

Fox
Feb 17th, 2000, 03:00 PM
So what are you using?

(It also works in forms)

*Super Sniper*
Feb 18th, 2000, 08:52 AM
I was using a form and switched to a picturebox but it doesn't work. :(

------------------
Website (http://www.kaynor.net)