Function IToR(i As Integer) As String
Dim s As String
s = "I II III IV V VI VII VIIIIX X XI XII "
IToR = Mid(s, (i - 1) * 4 + 1, 4)
End Function Private Sub cmdConvert_Click()
txtRomNum.Text = IToR(Val(txtMonth.Text))
End Sub
To create a number of letters we often use roman numerals to indicate the month of making the letter.For example, the letter number is '001/Int/III/2010' where the symbol 'III' indicates that the letter was made in March 2010.
For this we need a function that can convert an integer number from 1 to 12 into roman numerals. In the Visual Basic programming, we can easily create such a function. Well, here we'll show an example program to create such functions, as well as examples of how to use it.
So your Screen design will look like the image below:
Okay, you have completed the program
Now it's time to test
Consider the results
Creating a Function to Convert Numbers into Roman Numerals
Subscribe to:
Posts (Atom)
Labels
- Stop Dreaming Start Action (1)
- Table of Contents (1)
- VB6 Programming (36)
- VB6 Sample Program (16)