Solved

Need help with  Mouse Pointer Trails or Cursor trails in VB6.  How do I do that effect like on DHTML pages?

Posted on 2004-08-30
4
373 Views
Last Modified: 2013-12-04
Ok, so this is a cheezy toy function and I know how to load custom animated cursors, but what I'd like to do on a specific form, or when a certain object is the focus, is have an animated object with transparency following the cursor around with an elastic effect.

How do I go about coding this in VB?  I've seen hundreds of examples in javascript for web pages, but can't find anything for applications development.  

Here's an example of one I am talking about.

http://www.dynamicdrive.com/dynamicindex13/trailer.htm

New to VB, and know no Javascript.

Thanks for the help.
0
Comment
Question by:CORUSCATE
4 Comments
 
LVL 5

Expert Comment

by:rsriprac
ID: 11939652
I would recommend that you create a image box of some sort.  For the image box, there should be a property along the lines of "on mouse move".  Use it to track the coordnates and place the trailing image following the mouse.  Hope this gives some ideas to get you started.

-Ram
0
 
LVL 5

Accepted Solution

by:
WesleySaysHi earned 250 total points
ID: 11939864
If you wish to download the code of a "simple particle effect" for VB6, go to:
http://www.Planet-Source-Code.com/vb/scripts/ShowCode.asp?txtCodeId=55596&lngWId=1

If you understand that code, then you can download more mouse effects from:
http://www.freevbcode.com/ShowCode.asp?ID=1859

All downloads are free.

In case you are new to this, you need to understand 3 events:
Form_MouseDown (Button As Integer, Shift As Integer, X as Single, Y As Single)
Form_MouseUp (Button As Integer, Shift As Integer, X as Single, Y As Single)
Form_MouseMove (Button As Integer, Shift as Integer, X as Single, Y As Single)

Be aware that a mouse is not an object. It has no properties and it has no methods. The arguments for each mouse event are exactly the same:
Button As Integer, Shift As Integer, X as Single, Y As Single

Both the MouseDown and MouseUp events will be executed, for the control over which the mouse cursor is positioned, if you press and release a mouse button
MouseMove event will happen by moving a mouse and it will also happen when you click a mouse button.
Clicking a mouse button or moving a mouse does not automatically make anything happen inside your program, unless you write code that executes inside the mouse events.

There are very good free tutorials on the net, if you are interested. Here is a list with short descriptions of the tutorials and clickable links:
http://www.tutorialized.com/tutorials/Visual-Basic/1

Regards,
Wesley
0
 

Author Comment

by:CORUSCATE
ID: 12160880
wesleySAYSHi gave a very quick and thorough answer that was appropriate for my programming knowledge.  My apologies for letting this question sit for so long, our internet access was down for 11 days and after that I was out of town attending a funeral.  This has put me behind on my masters thesis, so my apologies for the delay in assigning these (IMHO) points I have been preoccupied.  Best wishes and thanks, CORUSCATE
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
wordcount challenge 11 110
tidtcpserver connection lost handle 2 72
Image decoding from Camera 3 73
Advice on Xojo as a development tool over VB. 4 40
As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

863 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

27 Experts available now in Live!

Get 1:1 Help Now