Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Lines in VB6

Posted on 2000-03-21
2
Medium Priority
?
142 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 60 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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

721 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