During the Spring Festival ,i have written a tool for converting source code to HTML .
Following is a snapshoot :

For example:
source code:
Private Sub printEnder(iFileNumber As Integer)
Print #iFileNumber, "</pre>"
Print #iFileNumber, "</td>"
Print #iFileNumber, "</tr>"
Print #iFileNumber, "</table>"
Print #iFileNumber, "<hr>"
' Print #iFileNumber, "<p align=right style=" & Chr(34) & _
"COLOR: yellow; FONT-WEIGHT: bold; FONT-SIZE: 8pt; _
BACKGROUND-COLOR: #339900; FONT-VARIANT: normal;" & _
Chr(34) & "> Generate By Code2Html at " & Now
Print #iFileNumber, "<p align=right style=" & Chr(34) & _
"COLOR: white; FONT-WEIGHT: bold; FONT-SIZE: 8pt;" & Chr(34) & _
"><a href="; Chr(34) & "mailto:ch21st@hotmail.com" & Chr(34) & _
"> Generate By Code2Html </span>at " & Now
Print #iFileNumber, "</HEAD>"
Print #iFileNumber, "</HTML>"
End Sub
After process:
Private Sub printEnder(iFileNumber As Integer)
Print #iFileNumber, "</pre>"
Print #iFileNumber, "</td>"
Print #iFileNumber, "</tr>"
Print #iFileNumber, "</table>"
Print #iFileNumber, "<hr>"
' Print #iFileNumber, "<p align=right style=" & Chr(34) & _
"COLOR: yellow; FONT-WEIGHT: bold; FONT-SIZE: 8pt; _
BACKGROUND-COLOR: #339900; FONT-VARIANT: normal;" & _
Chr(34) & "> Generate By Code2Html at " & Now
Print #iFileNumber, "<p" align=right style="" & Chr(34) & _
"COLOR:" white; FONT-WEIGHT: bold; FONT-SIZE: 8pt;"" & Chr(34) & _
"><a" href=";" Chr(34) & "mailto:ch21st@hotmail.com" & Chr(34) & _
">" Generate By Code2Html at "" & Now
Print #iFileNumber, "</HEAD>"
Print #iFileNumber, "</HTML>"
End Sub
|
--------
It will support VB ,VB. net ,C++,VC ++,C#,and so on .
Chinese New Year is popularly known as the Spring Festival since it begins in the spring. Its origin is too old to be traced. Although there are many speculations about the origin floating around, all agree that the word "Nian," which means "year" in modern Chinese, was the name of a beast that preyed on people on the eve of the lunar new year.
According to one legend, the beast Nian had a very big mouth that could swallow a great many people all at once. Naturally, everyone was scared. One day, an old man came along and offered to subdue Nian. To Nian he said, "I heard that you are very capable, but can you swallow other beasts of prey on earth instead of people who are by means of your worthy opponents?" Taking the old man's challenge, Nian swallowed many of the predators on earth, which were also a nuisance to people and their domestic animals from time to time.
As it turns out the old man was a god, and after subduing Nian, he and the beast disappeared. Now that Nian was gone and the other predators scared into forests, people began to enjoy their peaceful life. Before the old man left, he told people to put up red paper decorations (as red was the color Nian feared most) on their windows and doors at every year's end to scare away Nian, in case it sneaked back again.
From then on, the tradition of observing the conquest of Nian was carried on from generation to generation. The term "Guo Nian", which may have meant "Survive the Nian" today means "Celebrate the New Year" ("guo" in Chinese has the dual meaning of "pass-over" and "observe"). The custom of putting up red paper and firing firecrackers--to scare away Nian, should it run loose--is still around, but no longer hold the same meaning. For many people today, red sets the joyous mood while the popping of firecrackers adds to the excitement of the New Year.
The Traditions of Chinese New Year
The most important holiday in China is the Spring Festival, an event comparable to Christmas in the West. The date for this annual celebration is determined by the Lunar calendar instead of the Gregorian calendar, so the timing of the holiday varies from late January to early February.
Although the climax of the Chinese New Year, Nian, is only two or three days including the New Year's Eve, the New Year season lasts from the mid-twelfth month of the previous year to the middle of the first month of the of the new year. A month before the New Year is a good time to do business. People will pour out money to buy presents, decorations, foods and new clothes. In China, the transportation department, railroad in particular, nervously await the onslaughts of travelers rushing home from all parts of the country to celebrate the New Year with their families.
Days before the New Year, every family is busy thoroughly cleaning the house to wash away the ill-fortune of the current, and soon to be previous year. Some even give their doors and window-panes a new paint, usually a red color. They decorate the doors and windows with paper cutting and couplets with a variety of very popular theme: "happiness", "wealth", "longevity" and "satisfactory marriage with more children". Painting of the same themes are put up in the house on top of the newly mounted wall paper. In the old days, various kinds of food are presented to ancestors on their altars.
The Eve of the New Year is very carefully observed. Super is a feast, with all the family members coming together. One of the most popular course is jiaozi, dumplings boiled in water. "Jiaozi" in Chinese literally mean "sleep together and have sons", a long-lost good wish for a family. After dinner, the whole family to spend the night while having fun with cards or board games or watching TV programs dedicated to the occasion. Every light is supposed to be kept on the whole night. At midnight, the whole sky is lit up by fireworks and firecrackers, making everything seem like a war zone. People's excitement reach its zenith.
Very early the next morning, children greet their parents and are given cash presents tucked inside red envelopes. Afterwards, the family travel door to door, first greeting their relatives then their neighbors. The New Year is a great time for reconciliation; old grudges are very easily cast away during the greetings and the air is filled with warmth and friendliness. During and several days following New Year day, people visit each other to exchange gifts. The Festival of Lanterns sets in on the fifteen day of the new year to bring the celebration to a close. It is an occasion of lantern shows and folk dances everywhere. One typical food is Tang Yuan, dumplings made of sweet rice rolled into balls and stuffed with either sweet or spicy fillings.
Several precautions are taken to insure that the New Year will be a good one.
-
No sweeping is done on New Year's Day since the family's good luck might be swept away with the dirt.
-
Care must be taken not to break any dishes, and the use of knives, scissors, and sharp instrument should be avoided since these things could bring harm, and thus bad luck for the coming year.
-
Hair must be cleaned and set prior to the holiday. Doing so during the New Year season will create financial setbacks. Beauty shops and barber shops take
advantage of this by hiking their fees two-fold just before the New Year.
New Year is also a time of fear for debtors, as accounts are traditionally settled at the end of the year so that the coming year will begin with a clean slate.
Lion and Dragon Dances and parades are also part of the New Year Celebration.
The days following New Year include more religious ceremonies. The eleventh day is a time for inviting in-laws to dine. The Lantern Festival, held on the fifteenth day after New Year, marks the end of the New Year season, and daily routines resumes. Customs of observing the New Year vary from place to place and between groups of people.
Visual Basic (VB) is a programming language marketed by Microsoft Corporation. The system for connecting the programming language proper to the graphic user interface is a descendant of a system called Tripod, originally developed by Alan Cooper, and further developed by Cooper and his associates under contract to Microsoft. The internal language itself is a descendant of BASIC. It was first introduced by Microsoft in 1991 with the intention of making programing easier by having a visual basis for designing the user interface, and to some extent, the code.
Visual Basic 1.0 was released for DOS. The language itself was quite sparse, and the interface was barely graphical, using extended ASCII characters to simulate the appearance of a GUI. Visual Basic 2.0 through 3.0 were designed to be run within Microsoft Windows. They were 16-bit applications, and the programs produced by them were also 16-bit applications, ideally run under Windows 3.x. Visual Basic 4.0 was available as a 16-bit or a 32-bit version. The 32-bit version was more powerful, and ran on Windows 95. By version 5.0, Microsoft was releasing Visual Basic exclusively for 32-bit versions of Windows. Programmers who preferred to write 16-bit programs were pleased to find that Visual Basic 5.0 was able to import programs written in Visual Basic 4.0, and it was not difficult to convert Visual Basic 5.0 programs to be compatible with Visual Basic 4.0.

We can do it with StrConv Function.
The VB6 StrConv function, which performs several different conversions on strings, has an optional argument called LCID to specify a LocaleID for a string different than the local system's LocaleID.
Code:
Option Explicit
Private Sub Command1_Click()
Text2.Text = ConvertLang(Text1.Text)
End Sub
Private Sub Command2_Click()
Text3.Text = ConvertLang(Text2.Text, 1) & vbCrLf & ConvertLang(ConvertLang(Text1.Text), 1)
End Sub
Private Sub Form_Load()
Text1.Text = "???????"
End Sub
Private Function ConvertLang(ByVal strOrig As String, Optional iModel As Integer = 0) As String
Dim iFormLcid As Long
Dim iToLcid As Long
Select Case iModel
Case 0
iFormLcid = &H804
iToLcid = &H404
Case 1
iFormLcid = &H404
iToLcid = &H804
End Select
ConvertLang = StrConv(StrConv(strOrig, vbFromUnicode, iFormLcid), vbUnicode, iToLcid)
End Function