加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

currency sign changing - in vb.net

发布时间:2020-12-17 07:33:41 所属栏目:百科 来源:网络整理
导读:Option Strict OnImports System.GlobalizationImports System.ThreadingPublic Class Form1 Dim c As CultureInfo Sub New() ' 此调用是 Windows 窗体设计器所必需的。 InitializeComponent() ' 在 InitializeComponent() 调用之后添加任何初始化。 'Notes
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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读