currency sign changing - in vb.net

前端之家收集整理的这篇文章主要介绍了currency sign changing - in vb.net前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
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

猜你在找的VB相关文章