|
-
Feb 8th, 2000, 12:02 PM
#1
Thread Starter
Lively Member
--------------------------------------------------------------------------------
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
-
Feb 8th, 2000, 06:57 PM
#2
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.
-
Feb 9th, 2000, 07:56 AM
#3
Thread Starter
Lively Member
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. 
------------------
www.kaynor.net
-
Feb 9th, 2000, 08:36 AM
#4
PowerPoster
You mean
-
Form1.Picture = LoadPicture("C:\Test.bmp")
-
?
------------------
[email protected]
...
Every program can be reduced to one instruction which doesn't work.
-
Feb 11th, 2000, 03:02 PM
#5
Thread Starter
Lively Member
-
Feb 11th, 2000, 04:15 PM
#6
Thread Starter
Lively Member
I figured out how to set the picture to a part of the form. 
------------------
www.kaynor.net
-
Feb 16th, 2000, 12:42 PM
#7
Thread Starter
Lively Member
!<< UP TO THE TOP >>!
-
Feb 17th, 2000, 02:03 AM
#8
PowerPoster
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.
------------------
[email protected]
...
Every program can be reduced to one instruction which doesn't work.
-
Feb 17th, 2000, 08:53 AM
#9
Thread Starter
Lively Member
I am not using a picture box. 
------------------
Website
-
Feb 17th, 2000, 04:00 PM
#10
PowerPoster
So what are you using?
(It also works in forms)
-
Feb 18th, 2000, 09:52 AM
#11
Thread Starter
Lively Member
I was using a form and switched to a picturebox but it doesn't work. 
------------------
Website
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|