Solved

Lines in VB6

Posted on 2000-03-21
2
139 Views
Last Modified: 2010-05-02
Is it difficult to Draw a line on the canvas, then by clicking close to one end with the mouse, pick another point on the canvas and by clicking the mouse again to remove the old line and create the new one, while maintaining the lines other end ?

Also is it possible to have a tool tip when passing the mouse over a line ?
0
Comment
Question by:carmis
[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
2 Comments
 

Accepted Solution

by:
justinflitcroft earned 30 total points
ID: 2643098
It's not very difficult to do, but there a number of ways of doing it.
To make it draw a line between 2 mouse clicks, write code that saves the coordinates of the first click, waits for the 2nd click and saves its coordinates, then draws a line from these 2 coordinates. There are a number of ways of determining whether the click is the 1st or 2nd, including storing it in a variable.

As for the tooltip, you can use API functions to display tooltips, but you would have to write code to determine if the mouse was currently over the line or not.
0
 

Author Comment

by:carmis
ID: 2643184
I am trying to draw a line, then by clicking near one end of the same line to choose it, an then to revise the location of the new end, I would like to draw a line for Example at 45 degrees, then pick and drag that end over and down to 30 degrees, removing the one that was drawn at 45.

Hey thanks Carm
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…
Suggested Courses
Course of the Month11 days, 4 hours left to enroll

628 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