ybadragon's Profile User Rating: -----

Reputation: 1 Apprentice
Group:
Members
Active Posts:
32 (0.09 per day)
Joined:
11-May 12
Profile Views:
1,086
Last Active:
User is offline Yesterday, 05:31 AM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
Intel
Favorite Gaming Platform:
Playstation
Your Car:
Who Cares
Dream Kudos:
0

Latest Visitors

Icon   ybadragon Anything is possible. What matters is what is probable. Keep in mind probability is a variable we can all alter.

Posts I've Made

  1. In Topic: Number not 0-100 display messagebox

    Posted 27 Feb 2013

    View Postlar3ry, on 27 February 2013 - 09:03 AM, said:

    If IsNumeric(TextBox1.Text) AndAlso CInt(TextBox1.Text) < 100 Then
    
    


    I didn't know about AndAlso until now, it's interesting. Learn something new everyday :bigsmile:
  2. In Topic: Number not 0-100 display messagebox

    Posted 27 Feb 2013

    View PostIronRazer, on 27 February 2013 - 08:27 AM, said:

    You can also use this to check if it is a number
            If IsNumeric(TextBox1.Text) Then
                'Do all the other commands and case selection in here
            Else
                'Tell user not valid
            End If
    
    


    Good catch, I forgot about IsNumeric. :sigh:
  3. In Topic: Number not 0-100 display messagebox

    Posted 27 Feb 2013

    Quote

    But in this case, i need to exclude words/letters, anything lower than 0, and anything higher than 100. its in the private sub textbox1_leave.


    In this case you would first need to do Integer.TryParse(), then if that passes, do your check to see if what they have entered is between those two numbers.

    
    Public Class Form1
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    
            Dim i As Integer
    
            If Integer.TryParse(TextBox1.Text, i) Then ' see if what user entered is a number
                If CInt(TextBox1.Text) > 0 And CInt(TextBox1.Text) < 101 Then ' test if it's between specified values
                    MessageBox.Show("Valid Entry")
                Else
                    MessageBox.Show("Invalid Entry")
                End If
            Else
                MessageBox.Show("Invalid Entry")
            End If
        End Sub
    End Class
    
    
  4. In Topic: Text To Decimal is not valid? Please help

    Posted 20 Feb 2013

    View Postlar3ry, on 20 February 2013 - 07:45 AM, said:

    The colon is the problem. when doing a convert. You'll have to split the hoes and minutes, calculate the decimal part of the hour, and recombine them.


    I laughed at this typo while at work and got weird looks back :sweatdrop:
  5. In Topic: get text of the selected item in combobox

    Posted 4 Feb 2013

    @kristina1

    Try setting a Breakpoint in the code you provided at line 3, and check the value of SelectedValue, then step through the code using the F8 key, and check the values of your other variables, to see where exactly it is failing to see an Object reference.

My Information

Member Title:
New D.I.C Head
Age:
21 years old
Birthday:
June 12, 1991
Gender:
Location:
Indiana
Interests:
Learning any programming languages, Magic the Gathering, Soccer
Full Name:
Brian Thomason
Years Programming:
5
Programming Languages:
VB.Net, C#, Java, HTML, XHTML, SQL

Contact Information

E-mail:
Click here to e-mail me

Friends

Comments

ybadragon has no profile comments yet. Why not say hello?