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

You don't really need to change the variable names in that code snippet. The intMin = the minimum number to pass to the random number function, and the intMax is the maximum number to pass. If you were to change the type of variable to pass/return you would just change the parts that say 'integer', and you should keep them the same type for this particular thing, since the X & Y coordinates use the same type of variable.

You could either add all the code in a separate module, or since you're just making a real small app, just add it all into the main form. Put the Dim r stuff at the top in the Declarations section, and then the rest of the original code I pasted anywhere else in the main form's code. It's just a function you're going to be calling to generate the random numbers for you.

Then in the mouse hover event, do someth9ing along the lines of:

' Play with the 0, 100 numbers here. This is where you'll probably want to take into account the locations of the container holding the chkbox
dim intX as integer = GenerateRandomNumber(0, 100)
dim intY as integer = GenerateRandomNumber(0, 100)
 
' Assuming the name of the checkbox is "chkSike" ...
chkSike.Location = New Point(intX, intY)


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