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

x
?
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
Medium Priority
?
394 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
[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
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 1000 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

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Introduction to Processes

715 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