Solved

Lines in VB6

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now