Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Drawing rectangles on picturebox

Posted on 2004-04-23
1
Medium Priority
?
1,471 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 11

Accepted Solution

by:
dbrckovi earned 1000 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

719 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