|
-
Sep 23rd, 2000, 01:45 PM
#1
I need something to keep me occupied for the next week or so. Does anyone need a hand with a project they are working on? I'd like to help 'cos all I would be doing otherwise is sitting on my ass doing nothing.
-
Sep 23rd, 2000, 02:01 PM
#2
Hyperactive Member
I'd sooo love it if you could tell me what is wrong with my php script! Check out the thread before this one!
-
Sep 23rd, 2000, 05:45 PM
#3
Frenzied Member
Here's a real Challenge for you.
See If you can work out how to create a StdPicture object from a DC. (IE attatch the Bitmap in the DC to the stdPicture object like it does in a picture box.)
I'm working on a wrapper for a DC so you can have a Memory DC nicely wrapped in a class module and get all the advantages without bothering with the API, but I want to give it a Picture and an Image Property.
Just to get you started I've found an object called an IPicture, which comes with VB but is Hidden and Undocumented.
Try this, put 2 pictureboxes and a command button on your form and add this code.
Code:
Option Explicit
Private Sub Command1_Click()
'X is our IPicture object that we are investigating
Dim x As IPicture
'Y is a stdPicture Object
Dim Y As StdPicture
'We still need to set X to something with a bitmap in it
Set x = Form1.Image
'I'm not sure what this does, but it looks like a way of attatching a DC to the object
Call x.SelectPicture(Picture1.hDC, Picture1.hDC, Picture1.Image)
Set Y = x
Call Picture2.PaintPicture(Y, 0, 0)
End Sub
'This is just so we can draw in picture 1
Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, x As Single, Y As Single)
Picture1.Line -(x, Y)
End Sub
Have a play with drawing to picture1 and clicking the command button, see what happens to picture 2, there are other properties and methods in the IPicture so see what you can do with them.
I would be eternally greatful If you could crack that, I'm gonna have a bash at it when I get time but If you could have a look at it beforehand thatd' be great.
-
Sep 23rd, 2000, 06:19 PM
#4
Frenzied Member
I've just thought you may need to create a new stdPicture object with a bitmap in it, the best way to do this is is to use a resource file with a small blank bitmap in it.theres some stuff hereablout resource files.
-
Sep 23rd, 2000, 07:43 PM
#5
Hyperactive Member
Try fiddling with:
Code:
' ComTech Presents...
' ________ ________ ________
' /\__ __\/\_____ \ /\ ____'\
' \/__/\ \_/\/_____/\ \\ \ \__/\ \
' \ \ \ __\_\ \\ \ \ \ \ \
' \ \ \ /\____ \\ \ \ \ \ \
' \ \ \ \/____/\ \\ \ \ \ \ \
' __\_\ \__ ___\_\ \\ \ \_\_\ \
' /\_________\/\_______\\ \_____,/
' \/_________/\/_______/ \/_____/
' http://www.Geocities.com/Warmaster2000us
I3D is My Graphics engine that needs testers.
You said that you needed something to do for
the next week, how about trying my new GFX
Engine. Use the address above and
Good Graphics programming
Designer/Programmer of the Comtech Operating System(CTOS)
-
Sep 24th, 2000, 03:49 AM
#6
-
Sep 24th, 2000, 04:13 AM
#7
A DC is a device context. Most common use is for doing double buffered graphics
- gaffa
-
Sep 24th, 2000, 04:54 AM
#8
Sam,
I have absolutely no idea what you want this code to do. Could you explain a bit more, ie. why you are doing it in the first place?
Thanks.
-
Sep 24th, 2000, 05:41 AM
#9
Frenzied Member
Hey warmaster, that ASCII logo you made looks sooo cool 
How did you make it? by hand or do you have prog for it?
Looks to cool to make a prog to do it
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Sep 24th, 2000, 07:38 AM
#10
Monday Morning Lunatic
Sam wants to have a wrapper class for a memory DC, ie a bitmap image that can be generated/changed on the fly. He wants it to be compatible with StdPicture, so that you can do something like this:
Code:
Dim x as New SamPic
x.SetSize(100,100)
...draw to x.DC
Picture1.PaintPicture x, ...
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Sep 25th, 2000, 06:14 PM
#11
Hyperactive Member
Thanks for the compliment. I made the logo by hand(typing). It took about 20-30 minutes to make. It was actually was pretty easy. It just took a while. Experiment a bit with I3D...(I3D doesn't do anything like this, but It's a GFX Engine for 3D drawing.)
Designer/Programmer of the Comtech Operating System(CTOS)
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
|