2020年6月10日 星期三

vb.net 繁簡轉換 [Convert Tranditional to Simplified]


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim strData As String

        ' 將繁體中文字轉換成簡體中文
        strData = StrConv("測試", VbStrConv.SimplifiedChinese, 2052)
        ' 簡體中文 (GB2312) 系統的 LocaleID (LCID) 為 2052
        MessageBox.Show(strData) ' 顯示簡體中文字

        ' 將簡體中文字轉換成繁體中文
        strData = StrConv(strData, VbStrConv.TraditionalChinese, 1028)
        ' 繁體中文 (Big5) 系統的 LocaleID (LCID) 為 1028
        MessageBox.Show(strData) ' 顯示繁體中文字
    End Sub

沒有留言:

張貼留言