|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to create a control to do this?...I would like to create a control to do something like this:
accept a numeric value (>0 and <=3899) in the textbox, convert it to a Roman Numeral and display it in a label. Write functions called from the Leave event of the textbox to validate the entry in the textbox and convert it to Roman. The entry of an invalid value in the textbox should result in the entry going away, the textbox becoming yellow and getting focus. Valid entries should turn the textbox green and the control itself medium seagreen and display the Roman Numeral in the label. anyone have any ideas how this would be done? Hi Jason,
I did something similar a while back, though I didn't create a UserControl to do it.I just created a RomanConverter Class library. >> anyone have any ideas how this would be done? 1. Create a Class that converts integers to Roman numerals. You canfind an excellent example at "http://www.vb-helper.com/howto_roman_arabic.html". There are lots of other samples on the web, many in VB. Another one is : "http://www.thevbprogrammer.com/Ch08/08-10-RomanNumerals.htm" 2. Create your UserControl, referencing the above class, and adding all validation code as necessary. I assume you are familiar with the nuances of User control creation. 3. Compile your code and add that control to a Windows form to test it out. Note that Roman numbers are normally considered upto 3999 and not 3899. Hope this helps, Regards, Cerebrus. LOL, Hi Cor,
That's nice to hear, but whatever do *you* need the links for ? Regards, Cerebrus. Cerebrus,
When there comes again chalenges to create this smaller to have the samples. This is are nice things to do just for fun to make it as short as possible. We did this already once in a kind of way in this newsgroup with Roman (Latin) to (west) Arabian. Cor Show quoteHide quote "Cerebrus" <zorg***@sify.com> schreef in bericht news:1142933225.144374.173170@i40g2000cwc.googlegroups.com... > LOL, Hi Cor, > > That's nice to hear, but whatever do *you* need the links for ? > > Regards, > > Cerebrus. > |
|||||||||||||||||||||||