Help - Simple Graphics problems 
Author Message
 Help - Simple Graphics problems

Hi,

I've been trying to write a control for displaying a 3 dimensional
rectangular tower, to display some of the results of the rest of my
program, but I can't get the picturebox to even draw a damn line!

I tried loading and drawing an image, to see if it would display an
image, and yes it did (although at 1:1 scale, and I'd hoped to get it to
scale), but it still wouldn't draw a line.

I've played with the drawing settings to my wits end. Could someone give
me any hints as to what I'm doing wrong? The code for drawing the line
and picture follows. The picture is drawn to drawArea, an invisible
picturebox used as a buffer, and then this is copied to drawDisplay,
though as I get to see the logo, I assume that that works okay.

Thanks for any enlightenment that anyone can shed,

Andy

    drawArea.Picture = LoadPicture("c:/pic/logo.gif")

    drawArea.ForeColor = vbBlack
    drawArea.DrawWidth = 10
    drawArea.DrawStyle = vbSolid
    drawArea.DrawMode = vbBlackness 'vbCopyPen

    drawArea.Line (0, 0)-(drawArea.ScaleWidth, drawArea.ScaleHeight)



Fri, 15 Feb 2002 03:00:00 GMT  
 Help - Simple Graphics problems

Quote:

> The picture is drawn to drawArea, an invisible picturebox used as
> a buffer, and then this is copied to drawDisplay

you need:

drawArea.AutoRedraw = True

drawDisplay.Picture = drawArea.Image

--

Mark W. Lewis, Bristol (UK)

http://www.pericles.dial.pipex.com/



Fri, 15 Feb 2002 03:00:00 GMT  
 Help - Simple Graphics problems
Andrew,

    If you are doing some form of 3D modelling why don't you use OpenGL.

    The Visual Basic components that I used can be found at

http://is6.pacific.net.hk/~edx/

There is a reasonably good tutorial and loads of demos.

I used to "pick" programme as the basis for learning to use the components

Keith

Quote:

>Hi,

>I've been trying to write a control for displaying a 3 dimensional
>rectangular tower, to display some of the results of the rest of my
>program, but I can't get the picturebox to even draw a damn line!

>I tried loading and drawing an image, to see if it would display an
>image, and yes it did (although at 1:1 scale, and I'd hoped to get it to
>scale), but it still wouldn't draw a line.

>I've played with the drawing settings to my wits end. Could someone give
>me any hints as to what I'm doing wrong? The code for drawing the line
>and picture follows. The picture is drawn to drawArea, an invisible
>picturebox used as a buffer, and then this is copied to drawDisplay,
>though as I get to see the logo, I assume that that works okay.

>Thanks for any enlightenment that anyone can shed,

>Andy

>    drawArea.Picture = LoadPicture("c:/pic/logo.gif")

>    drawArea.ForeColor = vbBlack
>    drawArea.DrawWidth = 10
>    drawArea.DrawStyle = vbSolid
>    drawArea.DrawMode = vbBlackness 'vbCopyPen

>    drawArea.Line (0, 0)-(drawArea.ScaleWidth, drawArea.ScaleHeight)



Sat, 16 Feb 2002 03:00:00 GMT  
 Help - Simple Graphics problems

Quote:

> you need:

> drawArea.AutoRedraw = True

Thanks, that fixed it. Now, just one more question. How do fill a
region? It isn't a square box or circle, and that's all that I can find
infomation on...

Any ideas at all?

Andy



Sat, 16 Feb 2002 03:00:00 GMT  
 Help - Simple Graphics problems
That's a polygon shape, for which you can use API calls to do the filling.

Check out http://users.turboline.be/btl10148/ for details on FillRgn API,
including a working sample program for this.

John

Andrew Burns heeft geschreven in bericht

Quote:

>> you need:

>> drawArea.AutoRedraw = True

>Thanks, that fixed it. Now, just one more question. How do fill a
>region? It isn't a square box or circle, and that's all that I can find
>infomation on...

>Any ideas at all?

>Andy



Sat, 16 Feb 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Small simple graphics problem - help appreciated!

2. Simple graphics problem

3. help with simple graphics

4. HELP - Newbie needs help on simple problem!

5. A simple Mail problem in search for a equally simple answer

6. HELP!!Spiral problem(graphics)...

7. Graphics Problems - PLEASE HELP!!!!!

8. Please help: Graphic Put statement problem

9. Setting the normal coordinates system in graphics (Simple Line)

10. Help. Graphics problem in vb5

11. simple graphics question

12. Graphics Problem - Help needed

 

 
Powered by phpBB® Forum Software