User Profile

Collapse

Profile Sidebar

Collapse
Maria P
Maria P
Last Activity: Mar 15 '13, 02:31 AM
Joined: Mar 27 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Thanks for the reply.

    I'm not trying to set the text for the labels. That was done in the property settings for the labels themselves when I created my form. The text is set as "Seat 1", "Seat 2", etc...

    I have a million labels on this form.

    lblLabel1
    lblLabel2
    lblLabel3
    lblLabel4
    etc...

    I created an array so that I could use loops to manage...
    See more | Go to post

    Leave a comment:


  • How do you convert a string into an object

    So, I'm creating an array of labels. I have labels set up as:

    labal1
    label2
    label3
    etc...

    I've declared the array as such:
    Code:
    Dim labelArray(5) As Label
    Now, instead of assigning the labels one by one to the array (labelArray(0) = label1, labelArray(1) = label2, etc...), I was hoping to use a loop (there will be more than 5 labels). I have something like this, which obviously doesn't...
    See more | Go to post
    Last edited by Frinavale; Apr 3 '12, 02:06 PM. Reason: Added code tags

  • Okay, got it.

    So, was getting some out of bounds for the record when looking at other records (have a form set up where you can view a record at a time).

    So, under the text changed event, I used:

    Code:
    If IsNumeric(txtPhoneNumber.Text) Then
          phoneNumber = CDbl(txtPhoneNumber.Text.Trim)
    End If
    Then under button click events (when moving through records), added:
    ...
    See more | Go to post

    Leave a comment:


  • Formatting databound textbox as a phone number in VB.NET

    I have a databound textbox that I would like formatted as a phone number ((###) ###-####), instead of being displayed as 10 numbers.

    I'm using this on a databound label, which works fine. The same doesn't work on a textbox, though.

    phoneNumber = CDbl(lblPhoneNu mber.Text)

    lblPhoneNumber. Text = phoneNumber.ToS tring("(###) ###-####")


    Anyone know of something that will work...
    See more | Go to post
No activity results to display
Show More
Working...