Results 1 to 4 of 4

Thread: [RESOLVED] [2008] Textbox formating question.

  1. #1

    Thread Starter
    Addicted Member Alexandru_mbm's Avatar
    Join Date
    Jul 2007
    Location
    VBForums.com
    Posts
    157

    Resolved [RESOLVED] [2008] Textbox formating question.

    I have a DGV and a TextBox into my form.
    The TextBox displays the "DGV.rows.count" for example as "3" but i want to show me "00003". How can i format this textbox to diplay data like "000XX" ?

    Thanks in advice!
    I'm still learning VB.NET
    Sorry for my bad english
    Thanks for your help

  2. #2
    Code Monkey wild_bill's Avatar
    Join Date
    Mar 2005
    Location
    Montana
    Posts
    2,993

    Re: [2008] Textbox formating question.

    Code:
    Dim myNumber As Integer = 3
    Dim myFormattedNumber As String = myNumber.ToString("00000")
    That is the very essence of human beings and our very unique capability to perform complex reasoning and actually use our perception to further our understanding of things. We like to solve problems. -Kleinma

    Does your code in post #46 look like my code in #45? No, it doesn't. Therefore, wrong is how it looks. - jmcilhinney

  3. #3

    Thread Starter
    Addicted Member Alexandru_mbm's Avatar
    Join Date
    Jul 2007
    Location
    VBForums.com
    Posts
    157

    Re: [2008] Textbox formating question.

    I've tried like this but nothin' happends ....

    Code:
                Dim numar As Integer = Me.DataGridView1.Rows.Count
                Dim nr_cm As String = numar.ToString("00000")
                Me.txt_nr_cm.Text = nr_cm
    It shows me "3" simple. It's something wrong in that ?!
    I'm still learning VB.NET
    Sorry for my bad english
    Thanks for your help

  4. #4

    Thread Starter
    Addicted Member Alexandru_mbm's Avatar
    Join Date
    Jul 2007
    Location
    VBForums.com
    Posts
    157

    Re: [2008] Textbox formating question.

    Sorry it's working that way thanks alot wild_bill, yu're the man!
    I'm still learning VB.NET
    Sorry for my bad english
    Thanks for your help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width