dcsimg
Results 1 to 2 of 2

Thread: VB.NET appropriate replacement for VB6.Format(field, formatStyle)?

  1. #1

    Thread Starter
    Addicted Member kutlesh's Avatar
    Join Date
    Jun 2018
    Location
    Skopje, Macedonia
    Posts
    195

    VB.NET appropriate replacement for VB6.Format(field, formatStyle)?

    As the title says, how can I achieve this in VB.NET without using VB6 compatibility library?

    Code:
    maskedTextBox.Text = VB6.Format(maskedTextBox.Text, "###000")
    i.e add leading zeroes?

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    104,676

    Re: VB.NET appropriate replacement for VB6.Format(field, formatStyle)?

    If you want to add leading zeroes - leading any characters - to a String then you call its PadLeft method.

Tags for this Thread

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width