Trying to figure out a Spin Control

I'm working on a name generator. I got help in another post with a return issue. Now that that is taken care of, I'm looking to tweak my program to make it "smarter". As of right now, all it does is pick a random range and populate the string with random letters. Nothing too fancy just yet. I thought it would be a good feature to be able to determine the range of the number of possible letters in the name. It is easy enough to have edit boxes take in numbers and plug them into the range parameters for the name but I figure I'd put myself a little out of my comfort zone and give Spin Controls a shot. But for the life of me I can't figure out how to get it working right. I managed to get the control to work and "buddy" it to an edit box. That's as far as I got. Right now the control is set to zero but the numbers will only go up if I click on the down arrow and the up arrow does nothing. No matter how much I search, nothing I've found helps. I've found the official Microsoft stuff (I'm using Visual Studio 2010) but I don't know how to use the information they give to make it work for me. I found something that is supposed to work with the range of the spin control but I don't know how to implement it. Giving me a mention to a class and saying "This will blah blah blah" doesn't tell me how to implement it. I haven't had any luck finding code examples either.

Now that the "backstory" is out of the way, I'm looking to tweak the upper and lower range of the spin control, set a default value aside from zero, and get the up arrow to make the number actually go up :). I've learned enough of programming to be dangerous but there is so much of the "This is basic, you should know that!!" that I still need to learn.

Can anyone help me out?
I figured I'd bump this post rather than start a new one :).

I'm still looking to get spin controls to work. I haven't created a class for these objects that were pulled from the toolbox and placed on the form. I THINK I have my spin controls "buddied" to their respective edit box controls. What I'd like to do is set a particular range of the spin control. From what I've been able to find online, my spin control is working via default settings where clicking the down arrow makes the numbers go up and the up arrow does nothing. I'd like to set it to a more common sense use where clicking up increases the number.

I'd also like to set the minimum number that the control starts with. For example, I'd like the spin control to start at the number 5 and not be allowed to go lower. I'd also like to set a number that the spin control can't go past.

I've had quite a bit of help on the forums here and with that help so far I've been able to get away with not creating a class for the controls I have been working with. Can I still get away with it here or does a class need to be created? If so, what would be the simpler way to do it?
Topic archived. No new replies allowed.