Option Strict On
Imports System.Globalization
Imports System.Threading
Public Class Form1
Dim c As CultureInfo
Sub New()
' 此调用是 Windows 窗体设计器所必需的。
InitializeComponent()
' 在 InitializeComponent() 调用之后添加任何初始化。
'Notes : this is running on the current thread only. so means if your current system setting is US,it won't be overwritten.
System.Threading.Thread.CurrentThread.CurrentCulture = New System.Globalization.CultureInfo("it-IT") 'zh-TW 台湾 zh-CN 大陆, zh-hk 香港,it-IT 意大利,fr-FR
End Sub
Private Sub Button1_Click(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles Button1.Click
Me.TextBox1.Text = Format(900.58,"Currency")
'Dim MyInt As Integer = 100
'Thread.CurrentThread.CurrentUICulture = New CultureInfo("fr-FR")
'Dim MyString As String = MyInt.ToString("C",CultureInfo.InvariantCulture)
'MessageBox.Show(MyString)
End Sub
End Class
原文链接:https://www.f2er.com/vb/256661.html