Help Community Login:
STaRDoGG's picture
From:
Olympus
STaRDoGG
Head Mucky MuckJoined the Dark SidePremium Member (Gold)I'm a Code Monkey!The Steel CurtainI use FirefoxI use Google ChromeI use Internet ExplorerI use SafariLinux UserMac UserWindows UserI donated to GeekDrop simply because I love it!Booga Booga BoogaI took a bite of the AppleFormer Phrozen Crew MemberI'm MagicMember of VileThe Dr. put the stem on the apple!The JokerSomeone thinks you're udderly delightful!
Relationship Status:
Engaged
Joined: 01/14/2009
Posts: 2399
Drops: 2818
Mood: Content
Re: Mouse move event

Mouse Hover is the right event to use, but instead of making multiple checkbox objects for that one, use the same checkbox (less objects also means less overhead/memory used), but make a random number generator to generate a new X and Y Location for the checkbox object when the mouse hovers over it.

I wrote a little random number generator a while ago, you can use for starters, you may want to change the variable types to Single, Double, etc.

' Initialize random number generator
Dim r As New Random(System.DateTime.Now.Millisecond)
 
Public Function GenerateRandomNumber(ByVal intMin As Integer, ByVal intMax As Integer) As Integer
 
    GenerateRandomNumber = 0
    Return r.Next(intMin, intMax)
 
  End Function

Also, be careful to make sure the number you use as new coordinates doesn't go off the form, or outside of whatever container it's in (like a groupbox or something), you'll probably get an error. Index out of bounds, or similar. If it's only the Form as the container, you can use me.width, me.height, etc.


Never play leapfrog with a unicorn

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <embed> <object> <strike> <caption> <thead> <th> <param> <style> <BGSOUND> <color> <center> <font-size> <script>
  • You may quote other posts using [quote] tags.
  • Filtered words will be replaced with the filtered version of the word.
  • Textual smileys will be replaced with graphical ones.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <csharp>, <css>, <html4strict>, <javascript>, <php>, <vb>, <vbnet>, <xml>. Beside the tag style "<foo>" it is also possible to use "[foo]".
  • Lines and paragraphs break automatically.
  • You can use BBCode tags in the text.

More information about formatting options



NOT LOGGED IN

You are NOT logged in

NOTE: You are commenting as an anonymous guest. You will NOT immediately see your comment, but it's there. Please do not try to re-send the same comment. If you'd like to see it immediately, please login or create an account (no worries, it's free).


facebook codes exploits tips tricks Phrozen Crew
All contents ©Copyright GeekDrop 2009-2012
TOS | Privacy Policy