|
| | #1 (permalink) |
| You pussies can -interwebs better than that. Join Date: Jan 2003 Location: Earth
Posts: 1,975
| VB prank help. Hey. working with Visual Studio.NET 2k3 here, using their Visual Basic editor (classes, yay~) Anyway, my teacher decided to play a prank on me, so I'm going to play one on her, and I need a bit of help with my code. Looking for the code which will make the button move when moused over. (I know to use mousehover in the sub, but theres a single line of code that you put inside of the sub to make it move to a random spot on the form, so that you can't click on it)...The code to make it auto-unselect would be nice too, so you can't tab->enter to close the program. Thanks in advance.
__________________ Lolin Dread Knight Officer of (Too Much Brown) |
| | |
| | #2 (permalink) |
| CHARLIE DON'T SURF! Join Date: Jul 2004
Posts: 777
| HTML Code:
Oh, and for the Tab issue, set the button's TabStop property to False. Also, I have realized that it can go behind controls that are larger than it. Just right click on the button and click, "Bring To Front", after you are done adding controls. Last edited by Kallian : 10-17-2006 at 10:04 PM. |
| | |
| | #3 (permalink) | |
| You pussies can -interwebs better than that. Join Date: Jan 2003 Location: Earth
Posts: 1,975
| Quote:
EDIT: Also, does the variable need to be a class level variable? Going to be putting it in a program I'm going to be turning into her (extra credit for that kinda thing, she finds it hilarious. button1.visible=false was an amusing one. =P), but anyway, yeah, Does it matter if its class-level or control-level? Just curious, want to hide it the best I can. EDIT: Yeah, mousemove is still there.
__________________ Lolin Dread Knight Officer of (Too Much Brown) Last edited by Big W Powah! : 10-21-2006 at 03:57 PM. | |
| | |
| | #4 (permalink) |
| CHARLIE DON'T SURF! Join Date: Jul 2004
Posts: 777
| VB 6? I thought you were working with .NET 03? The variable can either be an instance variable or a local variable. You're not really worried about any kind of performance in this case so it doesn't matter. Instance variable would be nice because you could get a random number in any function within that class without having to allocate memory (again, if you cared about these types of things). |
| | |
| | #6 (permalink) | |
| You pussies can -interwebs better than that. Join Date: Jan 2003 Location: Earth
Posts: 1,975
| Quote:
Anyway, thank you again for the help. and yeah, so far I've not made a program bigger than that would fit on a floppy. Simple things like calculations and input validation. Then again, it is intro to programming. I'm a network major, so its not like its -that- important, heh. Just need to know a bit of programming to be able to make an auto-updater and stuff. I will say knowing how programs work has helped a lot when it comes to understanding what happens when you click on a button.
__________________ Lolin Dread Knight Officer of (Too Much Brown) | |
| | |
| | #8 (permalink) | |
| You pussies can -interwebs better than that. Join Date: Jan 2003 Location: Earth
Posts: 1,975
| Quote:
__________________ Lolin Dread Knight Officer of (Too Much Brown) | |
| | |
| | #10 (permalink) | |
| You pussies can -interwebs better than that. Join Date: Jan 2003 Location: Earth
Posts: 1,975
| Quote:
(I feel pretty good about it, considering the ammount of companies we have in and out of our building hiring about-to-graduate students.)
__________________ Lolin Dread Knight Officer of (Too Much Brown) | |
| | |
| | #11 (permalink) |
| Math Enthusiast/Badass MC Join Date: Jun 2002 Location: Seattle
Posts: 592
| It's good that you aren't using the fully integrated 2k3 (or even moreso 2k5) versions of VB/C# for an intro class. You'll learn a whole lot more writing all of the code vs. dragging and dropping controls via the toolbox. It's a godsend though when you start writing custom event handlers, validation and a DAL. ![]() Last edited by Zippygoose : 10-22-2006 at 11:39 PM. |
| | |
| | #12 (permalink) | |
| You pussies can -interwebs better than that. Join Date: Jan 2003 Location: Earth
Posts: 1,975
| Quote:
__________________ Lolin Dread Knight Officer of (Too Much Brown) | |
| | |
| | #13 (permalink) | |
| CHARLIE DON'T SURF! Join Date: Jul 2004
Posts: 777
| Quote:
| |
| | |
| | #14 (permalink) |
| Math Enthusiast/Badass MC Join Date: Jun 2002 Location: Seattle
Posts: 592
| IMO it's important for beginners to understand at the very least what the native handlers are doing, even if they aren't using them in any way. Otherwise they are just these mysterious "things" being passed into your event methods that VS is generating for you. Writing your own subs/methods is also helpful in understanding how everything is tied together. While it's nice to double click a button in your designer view and be taken to an auto-generated onclick event method, there is some value in knowing everything that went into the process (like wiring up those events). You are talking to a pure software guy though, perhaps you are right in regards to a basic programming class intended for network admins/hardware guys /shrug |
| | |
| | #15 (permalink) | |
| You pussies can -interwebs better than that. Join Date: Jan 2003 Location: Earth
Posts: 1,975
| Quote:
__________________ Lolin Dread Knight Officer of (Too Much Brown) | |
| | |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
| |