Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

Vb.net Codes (Numeric filtering)

TriGETZ

Novice
Advanced Member
Messages
20
Reaction score
0
Points
26
Guys pa help

dim status as bollean = false

If Not IsNumeric(GRADE1.Text) OrElse _
Not Enumerable.Range(1, 5).Contains(GRADE1.Text) OrElse _
Not GRADE3.Text = "" Then
MessageBox.Show("Please Input A Correct Grade", "Error")

Else
Status2 =true
end if

need ko sa textbox is dapat ang ilalagay is 1-5 and "" only

or may iba pa kayong alam na code???
 
Guys pa help

dim status as bollean = false

If Not IsNumeric(GRADE1.Text) OrElse _
Not Enumerable.Range(1, 5).Contains(GRADE1.Text) OrElse _
Not GRADE3.Text = "" Then
MessageBox.Show("Please Input A Correct Grade", "Error")

Else
Status2 =true
end if

need ko sa textbox is dapat ang ilalagay is 1-5 and "" only

or may iba pa kayong alam na code???

boss medyo malabo diko maintindihan,
pero try this ilagay mo sa keypress event

if isNumeric(Grade.text) And grade.text.Length<=5 then

e.handled=false
else
e.handled=true;
endif

ibig sabihin pa numeric ang nakalagay sa textbox at ang bilang ng characters ay di lalagpas sa lima
makapagtype ka pero pag lapas sa lima at hindi hindi numeric hindi mu ka makakapagtype sa textbox mo.
 
lagay mu lang to sa keypress event ng textbox mo


Dim allowedChars As String = "12345"

If allowedChars.IndexOf(e.KeyChar) = -1 Then
If Not e.KeyChar = Chr(Keys.Back) Then
e.Handled = True
Beep()
End If
End If
 
Last edited:
Back
Top Bottom