line drawing bug 
Author Message
 line drawing bug

when setting a picture scaleheight to a small value, get incorrect lines
drawn (line method) with relatively large coordinates:

 example:
 form1.picture1.left=0
 form1.picture1.top=0
 form1.picture1.width=2
 form1.picture1.height=2

 form1.picture1.line (1,130)-(1,1)   'draws correct line (ie from
bottom)
 form1.picture1.line (1,140)-(1,1)   'draws incorrect line (drawn from
top??)

 is this a bug and how would I report it to MS

 any help would be great
 Couch



Sat, 31 Jul 2004 20:40:37 GMT  
 line drawing bug
You mention setting the ScaleHeight, but then your code sets the .Height, so
I'm not certain what you are doing.  I do know, however, that the picturebox
cannot deal with coordinates whose value exceeds 32767 twips (no matter what
the scalemode may be).

Jim Deutch
MS Dev MVP

Quote:
> when setting a picture scaleheight to a small value, get incorrect lines
> drawn (line method) with relatively large coordinates:

>  example:
>  form1.picture1.left=0
>  form1.picture1.top=0
>  form1.picture1.width=2
>  form1.picture1.height=2

>  form1.picture1.line (1,130)-(1,1)   'draws correct line (ie from
> bottom)
>  form1.picture1.line (1,140)-(1,1)   'draws incorrect line (drawn from
> top??)

>  is this a bug and how would I report it to MS

>  any help would be great
>  Couch



Sun, 01 Aug 2004 01:29:21 GMT  
 line drawing bug
Sorry about the cross-posting, this is my first time using a newsgroup...

I gathered that the problem would be with integer overflow. I am finally
converting my QB civil engineering program (cogo) to VB6 and it uses real-world
coordinates. I was hoping that VB would do all of the graphics clipping for me.
But it looks like I will have to use my old QB graphics clipping routines (the
painful bit is with large arcs).

Cheers
Couch

Quote:

> You mention setting the ScaleHeight, but then your code sets the .Height, so
> I'm not certain what you are doing.  I do know, however, that the picturebox
> cannot deal with coordinates whose value exceeds 32767 twips (no matter what
> the scalemode may be).

> Jim Deutch
> MS Dev MVP



Sun, 01 Aug 2004 06:39:43 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Bug in drawing of controls or mouse?

2. Bug: drawing/resizing a PictureBox eat up GDI Resources on Win95

3. Is it possible to draw several lines?

4. Can code draw a line?

5. Printing ASCII Characters (Line Draw)

6. Line drawing + more

7. Drawing a line on a UserForm

8. Intellicad VBA Drawing a line and converting numbers

9. drawing a line across the page ...

10. Help with drawing a line...!!!

11. Draw a line around the picture?

12. Drawing lines via Addline-Method

 

 
Powered by phpBB® Forum Software