Dec 052017
 
Use a picture control to "drag" a text control in Visual Basic.
File MOVTXT.ZIP from The Programmer’s Corner in
Category BASIC Language
Use a picture control to “drag” a text control in Visual Basic.
File Name File Size Zip Size Zip Type
MOVTXT.FRM 11371 4268 deflated
MOVTXT.MAK 36 36 stored
README.DOC 1279 702 deflated
TPCREAD.ME 199 165 deflated

Download File MOVTXT.ZIP Here

Contents of the README.DOC file


FROM: Keith Funk (CIS 72240,2020)
TO: All
SUBJECT: DragDrop Demo Program.
DATE: July, 1991

Hi,

The enclosed code is a sample VB program that demonstrates how to use a
Picture Control to implement what appears to be a 'drag' operation on
a Text Control. Code of this type is required because a Text Control
cannot be dragged directly. A Text Control doesn't have a MouseDown
Event which can be used to detect when a user wants to drag the
control.

In addition, I've added some code that prevents a dragged control from
being dropped if it overlaps another control on the form. This code works
well if there is a limited number of controls on the form, but probably
would really 'bog down' on a form with many controls.

The program is purely a demonstration of programming methods and serves no
other useful purpose. It is intended for novice VB users like myself.

I'd really appreciated comments and criticism of all aspects of the program
including source code documentation, coding style, algorithms and general
program methodology.

The best way to read the program code is to select the code form and then
select (general) from the Control's combo box. Then use CTRL-DownArrow
to move from one Procedure to another.

Good luck.


 December 5, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)