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).
Olympus
Engaged
I got that code working in my program last night. I just need to play around with the numbers now. Also want to play with the variable type. One thing I notice that with with the mouse hover event it doesn't seem to react very snappy if you know what I mean. It's like you can catch it pretty easy and get your mouse over it to click it. I'd rather it be really fast as soon as your mouse slightly touches it it moves away. Any idea on how to punch it up? I created a mouse leave event that works the same way as the mouse hover. My thinking is if you did get your mouse over it as soon as you move the mouse again it would move. Not sure though if that helps much or at all.
MouseEnter or MouseMove might work then. Sounds like MouseHover waits for the mouse to stop for a second before triggering.
Also say I want to add function to my quiz that will keep track of your score and display the score on my final form. I'm guessing I'd want to create an array to do this?
It depends if it's just a number total, or somethign else. If it's just a number total that your'e adding up, a regular integer variable that you show in a label on the last form is good enough. If you're showing anything else, like different words for each answer, you could use any of the array types. In .net there are arrays, arraylists, collections, hashtables & dictionaries. Arrays are the oldest, collections are nice, but they're trying to phase those out I hear, and hashtables and dictionaries are said to be the most efficient. I tend to just use whichever is easiest at the time though.
Another option (if using a word summary of the score) would be to always keep the last form loaded, but not visible until you want it to be, then add a label or textbox to it, and as they answer things, append the score/answer to the label or textbox. When the form finally shows, it'll have all the stuff right there in the textbox for them to see.
I'm still using seperate forms for all my questions. I'd like to change that to use one form but not sure how that would work. I know you mentioned using tabs. I wasn't sure how to do that either. But with tab controls I'd rather not have 10 tabs visible along the top of the quiz really. Can you hide so it doesn't look like it's uisng tabs?
I haven't looked into the 2010 version of the tabcontrol yet, but in the previous ones, not really. You could just put 10 groupboxes on the form in the same place, put each quiz question in each one separately, then just set each one's visible property to true/false as needed. When you hide a groupbox all of it's contents are hidden with it.