Solved

Drawing rectangles on picturebox

Posted on 2004-04-23
1
1,465 Views
Last Modified: 2013-12-26
Hi,

I counter a problem when I draw a set of rectangles on picturebox, using line method.

the rectangles' height are 30 and width are 10, but the result is not what I expect.

some rectangles are slim and some are slightly thicker, though they are with same width value.

I do not know how to solve it.

Anyone can help me?


cc
0
Comment
Question by:cc_2000_sg
1 Comment
 
LVL 11

Accepted Solution

by:
dbrckovi earned 250 total points
ID: 10897856
Picture1.Line (100, 100)-(1000, 1000), 1, B

Coordinates specified here do not represent Top, Left, Width, Height as in other controls.

Theese coordinates are exact points where rectangle should be drawn.       Picture1.Line (X1, Y1)-(X2, Y2), 1, B
So we could think of them as   Line (Left,Top)-(Right,Bottom).

So rectangle in above example has width and height of 900

To translate Widths and Heights to Right and Bottom you can use:

Right = Left + Width
Bottom = Top + Height
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question