Solved

Drawing rectangles on picturebox

Posted on 2004-04-23
1
1,466 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Reading the Contents of a Directory In Access VBA 5 77
clicking a shape in a frame array vb6 3 47
checkbox to hide entire section 10 43
transition to visual .net from vb6 5 41
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…

820 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