what do we wrong?

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
7 posts Page 1 of 1
Contributors
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

what do we wrong?
Dummy1912
Hello,

it seems it keep saying fill out the form :(
but i don't get it.

any one?
Code: Select all
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If txtfirstname.Text = Nothing Or txtfirstname.Text.Length < 3 Then
                        MessageBox.Show("Fill out the required fields", "give a valid name", MessageBoxButtons.OK, MessageBoxIcon.Information)

                        txtfirstname.Focus()
                    End If
End Sub
i even added for example #CodenStuff thats longer then 3 chars lol
but keeps popup :(

thanks
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
Shim
VIP - Donator
VIP - Donator
Posts: 882
Joined: Wed Dec 14, 2011 5:02 am

Re: what do we wrong?
Shim
It works for me, if I enter text less than 3 it shows the messagebox and if I didn't it doesn't show the messagebox
Find my programs on Softpedia
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: what do we wrong?
Dummy1912
so if you add more then 3 then it don't show?
hmm thats weird
with me it keeps showing :(
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
Shim
VIP - Donator
VIP - Donator
Posts: 882
Joined: Wed Dec 14, 2011 5:02 am

Re: what do we wrong?
Shim
yes if I add more than 3 it don't show
Find my programs on Softpedia
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: what do we wrong?
Dummy1912
weird weird

still not working even deleted all error messages from every textbox
so 1 left and still that message :(
whats going on cryer;
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: what do we wrong?
Dummy1912
ok i think i found the problem
it seems that the text.lenght don't work
and textlenght don't exist in a custom textbox
does anyone know how to implement that into it?

even i already used
Code: Select all
Private Base As TextBox
    Sub New()
        Base = New TextBox
seems still not available :(

also find on msdn
Code: Select all
    Public Overridable ReadOnly Property TextLength As Integer
        Get
            Return TextLength
        End Get
    End Property

If txtfirstname.Text = Nothing Or txtfirstname.TextLength < 3 Then
also tried:
Code: Select all
Dim size As Int16 = txtfirstname.Text.Length
it returns 0 :(
seems with every part you see here its say 0
why?
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: what do we wrong?
Dummy1912
Never mind :)
fixt :)
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
7 posts Page 1 of 1
Return to “Coding Help & Support”