HACK TÜRKS
Would you like to react to this message? Create an account in a few clicks or log in to continue.

HACK TÜRKS


 
IP Doğrulama... Hosgeldnztu9AnasayfaLatest imagesAramaKayıt OlGiriş yapIP Doğrulama... Hosgeldnztu9

 

 IP Doğrulama...

Aşağa gitmek 
YazarMesaj
Admin [TEZOoO]
ADMİN - YÖNETİCİ
ADMİN - YÖNETİCİ
Admin [TEZOoO]


Mesaj Sayısı : 380
NERDEN : İstanbul/Sefaköy
Kayıt tarihi : 14/09/08

Kişi sayfası
Rep Puanı:
IP Doğrulama... Left_bar_bleue50000000/0IP Doğrulama... Empty_bar_bleue  (50000000/0)

IP Doğrulama... Empty
MesajKonu: IP Doğrulama...   IP Doğrulama... EmptySalı Eyl. 16, 2008 11:44 am

'Projenize 1 adet metin kutusu ve bir adet buton ekleyin

Public Function Valid_IP(IP As String) As Boolean
Dim i As Integer
Dim dot_count As Integer
Dim test_octet As String
Dim byte_check
IP = Trim$(IP)

' make sure the IP long enough before
' continuing
If Len(IP) < 8 Then
Valid_IP = False
'Show Message
MsgBox IP & " is Invalid", , "IP Validator"
Exit Function
End If

i = 1
dot_count = 0
For i = 1 To Len(IP)
If Mid$(IP, i, 1) = "." Then
' increment the dot count and
' clear the test octet variable
dot_count = dot_count + 1
test_octet = ""
If i = Len(IP) Then
' we've ended with a dot
' this is not good
Valid_IP = False
'Show Message
MsgBox IP & " is Invalid", , "IP Validator"
Exit Function
End If
Else
test_octet = test_octet & Mid$(IP, i, 1)
On Error Resume Next
byte_check = CByte(test_octet)
If (Err) Then
' either the value is not numeric
' or exceeds the range of the byte
' data type.
Valid_IP = False
Exit Function
End If
End If
Next i
' so far, so good
' did we get the correct number of dots?
If dot_count <> 3 Then
Valid_IP = False
Exit Function
End If
' we have a valid IP format!
Valid_IP = True
'Show Message
MsgBox IP & " is Valid", , "IP Validator"

End Function

Private Sub Command1_Click()
If Len(Text1) = 0 Then
MsgBox "Please type an IP Address in the textbox.", , "IP Validator"
Else
'Call the Function
Valid_IP Text1
End If
End Sub
Sayfa başına dön Aşağa gitmek
https://hackturks.yetkin-forum.com
 
IP Doğrulama...
Sayfa başına dön 
1 sayfadaki 1 sayfası

Bu forumun müsaadesi var:Bu forumdaki mesajlara cevap veremezsiniz
HACK TÜRKS :: Programlama :: C# j# vb.net (.NET dilleri)-
Buraya geçin:  
SİTENİ REKLAM VER (BEDAVA)
HACK TÜRKS
Siteni Ekle
Siteni Ekle
Siteni Ekle
Siteni Ekle
Siteni Ekle
Siteni Ekle
Siteni Ekle
Siteni Ekle

BÜYÜK YERİMİZ..!!!
Bedava forum kurmak | ©phpBB | Bedava yardımlaşma forumu | Suistimalı göstermek | Son tartışmalar