Solved

Lines in VB6

Posted on 2000-03-21
2
134 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…

756 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